From cb96c4e85fbbc6e4364ca73a387414687a5de126 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Tue, 7 Aug 2012 11:32:27 +0200 Subject: [PATCH] Add touch input support in opentyrian menu, 5th commit: Destruct is not adapted for touch input, so we show it only if keyboard is used. --- project/jni/application/opentyrian/src/opentyr.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/project/jni/application/opentyrian/src/opentyr.cpp b/project/jni/application/opentyrian/src/opentyr.cpp index c97e0f08b..8ddb0ffb9 100644 --- a/project/jni/application/opentyrian/src/opentyr.cpp +++ b/project/jni/application/opentyrian/src/opentyr.cpp @@ -124,6 +124,9 @@ void opentyrian_menu( void ) text = buffer; } + // Destruct is not adapted for touch input, so we show it only if keyboard is used: + if (i == menu_item_destruct && (mousedown || lastkey_sym == SDLK_ESCAPE)) + continue; draw_font_hv_shadow(VGAScreen, VGAScreen->w / 2, (i != maxSel) ? i * menu_spacing + menu_top : 118, text, normal_font, centered, 15, (i != sel) ? -4 : -2, false, 2); }