made escape button respond to release

This commit is contained in:
Isaac0-dev 2025-06-04 11:47:52 +10:00
parent ecbb911367
commit dc4678c121

View file

@ -211,12 +211,6 @@ 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++) {
@ -289,6 +283,12 @@ 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]) {