File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ class FreeCamera : public ModInterface
6262 bool areControlsVisible;
6363 std::unordered_map<std::string, std::string> pcControls;
6464 std::unordered_map<std::string, std::string> controllerControls;
65+ bool pauseGame;
6566
6667 float freeCamSpeedChangeThreshold;
6768 float freeCamTranslationSpeedChangeSensitivity;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ FreeCamera::FreeCamera() :
2626 instantlyKillNpcAction(" InstantKill" ),
2727 teleportMainCharacterAction(" Teleport" ),
2828 areControlsVisible(false ),
29+ pauseGame(false ),
2930 freeCamSpeedChangeThreshold(0 .5f ),
3031 deltaTranslationSpeed(0 .f),
3132 freeCamTranslationSpeedChangeSensitivity(4 .f),
@@ -160,6 +161,18 @@ void FreeCamera::OnDrawMenu()
160161 ToggleFreeCamera ();
161162 }
162163
164+ if (ImGui::Checkbox (ICON_MD_TIMER " Pause Game" , &pauseGame))
165+ {
166+ if (pauseGame)
167+ {
168+ GameLoopManager->SetPlayMode (EPlayMode::PLAYMODE_PAUSED);
169+ }
170+ else
171+ {
172+ GameLoopManager->SetPlayMode (EPlayMode::PLAYMODE_PLAYING);
173+ }
174+ }
175+
163176 if (ImGui::Button (ICON_MD_SPORTS_ESPORTS " Free Camera Controls" ))
164177 {
165178 areControlsVisible = !areControlsVisible;
You can’t perform that action at this time.
0 commit comments