From 80fa885c137ca415ee16180b41530e4aa2267aeb Mon Sep 17 00:00:00 2001 From: pelya Date: Mon, 9 Jun 2014 00:56:58 +0300 Subject: [PATCH] OpenTyrian: hide text input button during game --- project/jni/application/opentyrian/src/tyrian2.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/project/jni/application/opentyrian/src/tyrian2.c b/project/jni/application/opentyrian/src/tyrian2.c index 4021fdd44..85be3d9cf 100644 --- a/project/jni/application/opentyrian/src/tyrian2.c +++ b/project/jni/application/opentyrian/src/tyrian2.c @@ -52,7 +52,9 @@ #include #include #include + #include +#include "SDL_screenkeyboard.h" inline static void blit_enemy( SDL_Surface *surface, unsigned int i, signed int x_offset, signed int y_offset, signed int sprite_offset ); @@ -3358,6 +3360,11 @@ bool JE_titleScreen( JE_boolean animate ) const JE_byte menu_top = 96, menu_spacing = 14; #endif +#ifdef ANDROID + // Show text input button in main menu, to make entering cheats possible + SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_TEXT, 1); +#endif + unsigned int arcade_code_i[SA_ENGAGE] = { 0 }; JE_word waitForDemo; @@ -3765,6 +3772,11 @@ trentWinsGame: fade_black(15); } +#ifdef ANDROID + // Hide text input button for other parts of the game + SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_TEXT, 0); +#endif + return quit; }