| 196 | } |
| 197 | |
| 198 | void Window_Interpreter::Update() { |
| 199 | if (sub_window_flags->GetActive()) { |
| 200 | if (Input::IsTriggered(Input::InputButton::CANCEL)) { |
| 201 | sub_window_flags->SetActive(false); |
| 202 | sub_window_flags->SetVisible(false); |
| 203 | sub_window_flags->SetIndex(-1); |
| 204 | } else { |
| 205 | sub_window_flags->Update(); |
| 206 | } |
| 207 | return; |
| 208 | } |
| 209 | Window_Selectable::Update(); |
| 210 | |
| 211 | if (IsHoveringSubActionLine()) { |
| 212 | sub_actions.Update(*this); |
| 213 | |
| 214 | if (Input::IsTriggered(Input::InputButton::DECISION)) { |
| 215 | if (GetSelectedAction() == UiAction::ShowRuntimeFlags) { |
| 216 | sub_window_flags->SetActive(true); |
| 217 | sub_window_flags->SetVisible(true); |
| 218 | this->Refresh(); |
| 219 | |
| 220 | Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Decision)); |
| 221 | } else if (GetSelectedAction() == UiAction::ShowMovementInfo) { |
| 222 | Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Buzzer)); |
| 223 | } |
| 224 | } |
| 225 | } else { |
| 226 | sub_actions.ClearIndex(); |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | bool Window_Interpreter::IsHoveringSubActionLine() const { |
| 231 | return GetIndex() == 1 && sub_actions.IsVisible(); |
nothing calls this directly
no test coverage detected