MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / HandleControlSettingsInput

Method HandleControlSettingsInput

TombEngine/Game/gui.cpp:679–899  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677 }
678
679 void GuiController::HandleControlSettingsInput(ItemInfo* item, bool fromPauseMenu)
680 {
681 unsigned int numControlSettingsOptions = 0;
682 switch (MenuToDisplay)
683 {
684 default:
685 case Menu::GeneralActions:
686 numControlSettingsOptions = (int)GeneralActionStrings.size() + 2;
687 break;
688
689 case Menu::VehicleActions:
690 numControlSettingsOptions = (int)VehicleActionStrings.size() + 2;
691 break;
692
693 case Menu::QuickActions:
694 numControlSettingsOptions = (int)QuickActionStrings.size() + 2;
695 break;
696
697 case Menu::MenuActions:
698 numControlSettingsOptions = (int)MenuActionStrings.size() + 2;
699 break;
700 }
701
702 OptionCount = numControlSettingsOptions;
703 CurrentSettings.NewKeyWaitTimer = 0.0f;
704
705 if (CurrentSettings.IgnoreInput)
706 {
707 if (NoAction())
708 CurrentSettings.IgnoreInput = false;
709
710 return;
711 }
712
713 if (GuiIsSelected() &&
714 SelectedOption <= (numControlSettingsOptions - 3))
715 {
716 SoundEffect(SFX_TR4_MENU_SELECT, nullptr, SoundEnvironment::Always);
717 CurrentSettings.NewKeyWaitTimer = SettingsData::NEW_KEY_WAIT_TIMEOUT;
718 CurrentSettings.IgnoreInput = true;
719 }
720
721 if (CurrentSettings.NewKeyWaitTimer > 0)
722 {
723 ClearAllActions();
724
725 g_Synchronizer.Init();
726
727 bool legacy30FpsDoneDraw = false;
728 bool decreaseCounter = false;
729
730 while (CurrentSettings.NewKeyWaitTimer > 0)
731 {
732 g_Synchronizer.Sync();
733
734 while (g_Synchronizer.Synced())
735 {
736 CurrentSettings.NewKeyWaitTimer--;

Callers

nothing calls this directly

Calls 15

NoActionFunction · 0.85
SoundEffectFunction · 0.85
ClearAllActionsFunction · 0.85
ControlPhaseFunction · 0.85
UpdateInputActionsFunction · 0.85
DefaultConflictFunction · 0.85
MenuEnum · 0.85
SaveConfigurationFunction · 0.85
ApplyDefaultBindingsFunction · 0.85
SyncMethod · 0.80
SyncedMethod · 0.80
PrepareSceneMethod · 0.80

Tested by

no test coverage detected