MCPcopy Create free account
hub / github.com/EasyRPG/Player / HandleExtraCommandsWindow

Method HandleExtraCommandsWindow

src/scene_file.cpp:294–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294bool 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}

Callers

nothing calls this directly

Calls 6

IsItemEnabledMethod · 0.80
SePlayMethod · 0.80
IsVisibleMethod · 0.45
UpdateMethod · 0.45
GetIndexMethod · 0.45
SetVisibleMethod · 0.45

Tested by

no test coverage detected