mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-02-28 21:02:51 +03:00
Make DebugPause work with a shortcut
This commit is contained in:
parent
92fe25c22d
commit
f90ba8d4ad
@ -165,6 +165,14 @@ void OnGameUpdatePost(IEvent* event) {
|
||||
}
|
||||
|
||||
void OnPlayUpdateEvent(IEvent* event){
|
||||
bool debugPaused = CVarGetInteger("gDebugPause", 0);
|
||||
if (CVarGetInteger("gLToDebugPause", 0)){
|
||||
if (gControllerPress[0].button & L_TRIG) {
|
||||
CVarSetInteger("gDebugPause", !debugPaused);
|
||||
}
|
||||
} else {
|
||||
CVarSetInteger("gDebugPause", 0); //Unpause if we disable the shortcut
|
||||
}
|
||||
event->cancelled = CVarGetInteger("gDebugPause", 0);
|
||||
}
|
||||
|
||||
|
@ -718,9 +718,8 @@ void DrawDebugMenu() {
|
||||
.tooltip = "Jump to credits at the main menu"
|
||||
});
|
||||
|
||||
if (gGameState == GSTATE_PLAY){
|
||||
UIWidgets::CVarCheckbox("Debug Pause", "gDebugPause");
|
||||
}
|
||||
UIWidgets::CVarCheckbox("Press L to Debug Pause", "gLToDebugPause");
|
||||
|
||||
|
||||
if (CVarGetInteger(StringHelper::Sprintf("gCheckpoint.%d.Set", gCurrentLevel).c_str(), 0)) {
|
||||
if (UIWidgets::Button("Clear Checkpoint")) {
|
||||
|
Loading…
Reference in New Issue
Block a user