| 292 | } |
| 293 | |
| 294 | bool Scene_File::HandleExtraCommandsWindow() { |
| 295 | if (!extra_commands_window->IsVisible()) { |
| 296 | return false; |
| 297 | } |
| 298 | |
| 299 | extra_commands_window->Update(); |
| 300 | |
| 301 | #ifdef EMSCRIPTEN |
| 302 | if (Input::IsTriggered(Input::DECISION)) { |
| 303 | if (extra_commands_window->GetIndex() == 0) { |
| 304 | // Download |
| 305 | if (!extra_commands_window->IsItemEnabled(0)) { |
| 306 | Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Buzzer)); |
| 307 | return true; |
| 308 | } |
| 309 | |
| 310 | Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Decision)); |
| 311 | Emscripten_Interface::DownloadSavegame(index + 1); |
| 312 | extra_commands_window->SetVisible(false); |
| 313 | } else { |
| 314 | Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Decision)); |
| 315 | Emscripten_Interface::UploadSavegame(index + 1); |
| 316 | extra_commands_window->SetVisible(false); |
| 317 | } |
| 318 | } else if (Input::IsTriggered(Input::CANCEL)) { |
| 319 | Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Cancel)); |
| 320 | extra_commands_window->SetVisible(false); |
| 321 | } |
| 322 | #endif |
| 323 | |
| 324 | return true; |
| 325 | } |
nothing calls this directly
no test coverage detected