Restore DJUI pause menu escape key navigation

Sorry Isaac, keeping it in key down is better imo because that way you can navigate back in the pause menu using the escape key. I frequently use that and I noticed it completely closed the menu in 1.4
This commit is contained in:
Agent X 2025-11-15 13:49:08 -05:00
parent d8b3edb561
commit 25ba1f330c

View file

@ -211,6 +211,12 @@ bool djui_interactable_on_key_down(int scancode) {
}
}
if (scancode == SCANCODE_ESCAPE && djui_panel_is_active()) {
// pressed escape button on keyboard
djui_panel_back();
return true;
}
if (gDjuiChatBox != NULL && !gDjuiChatBoxFocus) {
bool pressChat = false;
for (int i = 0; i < MAX_BINDS; i++) {
@ -283,12 +289,6 @@ void djui_interactable_on_key_up(int scancode) {
}
}
if (scancode == SCANCODE_ESCAPE && djui_panel_is_active()) {
// pressed escape button on keyboard
djui_panel_back();
return;
}
if (gDjuiPlayerList != NULL || gDjuiModList != NULL) {
for (int i = 0; i < MAX_BINDS; i++) {
if (scancode == (int)configKeyPlayerList[i]) {