| 140 | } |
| 141 | |
| 142 | void Scene_Settings::SetMode(Window_Settings::UiMode new_mode) { |
| 143 | if (new_mode == mode) { |
| 144 | return; |
| 145 | } |
| 146 | mode = new_mode; |
| 147 | |
| 148 | main_window->SetActive(false); |
| 149 | main_window->SetVisible(false); |
| 150 | options_window->SetActive(false); |
| 151 | options_window->SetVisible(false); |
| 152 | input_window->SetActive(false); |
| 153 | input_window->SetVisible(false); |
| 154 | input_mode_window->SetActive(false); |
| 155 | input_mode_window->SetVisible(false); |
| 156 | input_help_window->SetVisible(false); |
| 157 | help_window->SetVisible(false); |
| 158 | help_window2->SetVisible(false); |
| 159 | about_window->SetVisible(false); |
| 160 | |
| 161 | picker_window.reset(); |
| 162 | font_size_window.reset(); |
| 163 | |
| 164 | switch (mode) { |
| 165 | case Window_Settings::eNone: |
| 166 | case Window_Settings::eMain: |
| 167 | main_window->SetActive(true); |
| 168 | main_window->SetVisible(true); |
| 169 | break; |
| 170 | case Window_Settings::eInputButtonOption: |
| 171 | help_window->SetVisible(true); |
| 172 | input_window->SetVisible(true); |
| 173 | input_window->SetInputButton(static_cast<Input::InputButton>(options_window->GetFrame().arg)); |
| 174 | input_window->SetIndex(-1); |
| 175 | input_mode_window->SetActive(true); |
| 176 | input_mode_window->SetVisible(true); |
| 177 | input_help_window->SetVisible(true); |
| 178 | input_help_window->SetText("Emergency reset: Hold 4 keys and follow instructions"); |
| 179 | RefreshInputActionAllowed(); |
| 180 | break; |
| 181 | case Window_Settings::eInputButtonAdd: |
| 182 | help_window->SetVisible(true); |
| 183 | input_window->SetVisible(true); |
| 184 | input_window->SetInputButton(static_cast<Input::InputButton>(options_window->GetFrame().arg)); |
| 185 | input_mode_window->SetVisible(true); |
| 186 | input_help_window->SetVisible(true); |
| 187 | input_help_window->SetText("Press a key to bind. To abort the mapping wait 3 seconds"); |
| 188 | break; |
| 189 | case Window_Settings::eInputButtonRemove: |
| 190 | help_window->SetVisible(true); |
| 191 | input_window->SetActive(true); |
| 192 | input_window->SetVisible(true); |
| 193 | input_window->SetIndex(0); |
| 194 | input_mode_window->SetVisible(true); |
| 195 | input_help_window->SetVisible(true); |
| 196 | input_help_window->SetText("Select the keybinding you want to remove"); |
| 197 | break; |
| 198 | case Window_Settings::eAbout: |
| 199 | about_window->SetVisible(true); |
nothing calls this directly
no test coverage detected