X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fevents.c;h=f3330a7ee318ece3e7578f01551a509161c4396f;hp=6fee5bbce8684de0badc8642ca52a9bfeeb76e68;hb=0732b0680b5ce9468facaef0b7d9a50fc0894515;hpb=05f79aac9452f5666ee6dc712637adc1d9ae6b7a diff --git a/src/events.c b/src/events.c index 6fee5bbc..f3330a7e 100644 --- a/src/events.c +++ b/src/events.c @@ -1452,9 +1452,15 @@ void HandleKeyEvent(KeyEvent *event) // always map the "back" button to the "escape" key on Android devices key = KSYM_Escape; } + else if (key == KSYM_Menu) + { + // the "menu" button can be used to toggle displaying virtual buttons + if (key_status == KEY_PRESSED) + SetOverlayEnabled(!GetOverlayEnabled()); + } else { - // for any key event other than "back" button, disable overlay buttons + // for any other "real" key event, disable virtual buttons SetOverlayEnabled(FALSE); } #endif