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

Method DoPauseMenu

TombEngine/Game/gui.cpp:1134–1243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1132 }
1133
1134 InventoryResult GuiController::DoPauseMenu(ItemInfo* item)
1135 {
1136 enum PauseMenuOption
1137 {
1138 Statistics,
1139 Options,
1140 ExitToTitle
1141 };
1142
1143 static const int numPauseOptions = 2;
1144 static const int numStatisticsOptions = 0;
1145 static const int numOptionsOptions = 2;
1146
1147 TimeInMenu++;
1148 UpdateInputActions();
1149
1150 switch (MenuToDisplay)
1151 {
1152 case Menu::Pause:
1153 OptionCount = numPauseOptions;
1154 break;
1155
1156 case Menu::Statistics:
1157 OptionCount = numStatisticsOptions;
1158 break;
1159
1160 case Menu::Options:
1161 OptionCount = numOptionsOptions;
1162 break;
1163
1164 case Menu::Display:
1165 HandleDisplaySettingsInput(true);
1166 return InventoryResult::None;
1167
1168 case Menu::GeneralActions:
1169 case Menu::VehicleActions:
1170 case Menu::QuickActions:
1171 case Menu::MenuActions:
1172 HandleControlSettingsInput(item, true);
1173 return InventoryResult::None;
1174
1175 case Menu::OtherSettings:
1176 HandleOtherSettingsInput(true);
1177 return InventoryResult::None;
1178 }
1179
1180 if (MenuToDisplay == Menu::Pause ||
1181 MenuToDisplay == Menu::Options)
1182 {
1183 SelectedOption = GetLoopedSelectedOption(SelectedOption, OptionCount, g_Configuration.MenuOptionLoopingMode == MenuOptionLoopingMode::AllMenus);
1184 }
1185
1186 if (GuiIsDeselected() || IsClicked(In::Pause))
1187 {
1188 SoundEffect(SFX_TR4_MENU_SELECT, nullptr, SoundEnvironment::Always);
1189
1190 if (MenuToDisplay == Menu::Pause)
1191 {

Callers 1

CallPauseMethod · 0.80

Calls 3

UpdateInputActionsFunction · 0.85
IsClickedFunction · 0.85
SoundEffectFunction · 0.85

Tested by

no test coverage detected