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

Method UpdateButtonOption

src/scene_settings.cpp:528–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526}
527
528void Scene_Settings::UpdateButtonOption() {
529 if (Input::IsTriggered(Input::DECISION)) {
530 switch (input_mode_window->GetIndex()) {
531 case 0:
532 if (!input_mode_window->IsItemEnabled(0)) {
533 Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Game_System::SFX_Buzzer));
534 } else {
535 Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Game_System::SFX_Decision));
536 options_window->Push(Window_Settings::eInputButtonAdd, options_window->GetFrame().arg);
537 }
538 break;
539 case 1:
540 if (!input_mode_window->IsItemEnabled(1)) {
541 Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Game_System::SFX_Buzzer));
542 } else {
543 Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Game_System::SFX_Decision));
544 options_window->Push(Window_Settings::eInputButtonRemove, options_window->GetFrame().arg);
545 }
546 break;
547 case 2:
548 Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Game_System::SFX_Decision));
549 input_window->ResetMapping();
550 break;
551 }
552 RefreshInputActionAllowed();
553 }
554}
555
556void Scene_Settings::UpdateButtonAdd() {
557 const Input::KeyStatus* keys = &Input::GetAllRawPressed();

Callers

nothing calls this directly

Calls 6

IsItemEnabledMethod · 0.80
SePlayMethod · 0.80
ResetMappingMethod · 0.80
GetIndexMethod · 0.45
PushMethod · 0.45
GetFrameMethod · 0.45

Tested by

no test coverage detected