Escape now returns to the previous menu if used from a submenu in the SDL port
This commit is contained in:
parent
1d34637bda
commit
9e808b255c
@ -1369,7 +1369,11 @@ void run_gui(bool is_running)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event.key.keysym.scancode == SDL_SCANCODE_ESCAPE) {
|
else if (event.key.keysym.scancode == SDL_SCANCODE_ESCAPE) {
|
||||||
if (is_running) {
|
if (gui_state == SHOWING_MENU && current_menu != root_menu) {
|
||||||
|
return_to_root_menu(0);
|
||||||
|
should_render = true;
|
||||||
|
}
|
||||||
|
else if (is_running) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user