mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-03-01 05:12:46 +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){
|
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);
|
event->cancelled = CVarGetInteger("gDebugPause", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -718,9 +718,8 @@ void DrawDebugMenu() {
|
|||||||
.tooltip = "Jump to credits at the main menu"
|
.tooltip = "Jump to credits at the main menu"
|
||||||
});
|
});
|
||||||
|
|
||||||
if (gGameState == GSTATE_PLAY){
|
UIWidgets::CVarCheckbox("Press L to Debug Pause", "gLToDebugPause");
|
||||||
UIWidgets::CVarCheckbox("Debug Pause", "gDebugPause");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CVarGetInteger(StringHelper::Sprintf("gCheckpoint.%d.Set", gCurrentLevel).c_str(), 0)) {
|
if (CVarGetInteger(StringHelper::Sprintf("gCheckpoint.%d.Set", gCurrentLevel).c_str(), 0)) {
|
||||||
if (UIWidgets::Button("Clear Checkpoint")) {
|
if (UIWidgets::Button("Clear Checkpoint")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user