From: Holger Schemel Date: Tue, 11 Dec 2018 22:53:07 +0000 (+0100) Subject: added toggling virtual buttons using 'menu' button on Android X-Git-Tag: 4.1.2.0~79 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=0732b0680b5ce9468facaef0b7d9a50fc0894515;hp=05f79aac9452f5666ee6dc712637adc1d9ae6b7a added toggling virtual buttons using 'menu' button on Android --- 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