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.
This commit is contained in:
Bernhard Kaindl
2012-08-07 11:32:27 +02:00
parent db06210606
commit cb96c4e85f

View File

@@ -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);
}