projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added virtual keyboard on Android port when entering player name
[rocksndiamonds.git]
/
src
/
screens.c
diff --git
a/src/screens.c
b/src/screens.c
index 61cb7106041aa68ad59b2af9b755d9d807d11c3e..a6c7e0a635e7eb098163ba0e8dc1732a8e7e0d02 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-3159,6
+3159,10
@@
void HandleTypeName(int newxpos, Key key)
strcpy(last_player_name, setup.player_name);
xpos = newxpos;
strcpy(last_player_name, setup.player_name);
xpos = newxpos;
+
+#if defined(TARGET_SDL2)
+ SDL_StartTextInput();
+#endif
}
else if (is_valid_key_char && xpos < MAX_PLAYER_NAME_LEN)
{
}
else if (is_valid_key_char && xpos < MAX_PLAYER_NAME_LEN)
{
@@
-3204,6
+3208,10
@@
void HandleTypeName(int newxpos, Key key)
startx = mSX + ALIGNED_TEXT_XPOS(pos);
DrawText(startx, starty, setup.player_name, font_nr);
startx = mSX + ALIGNED_TEXT_XPOS(pos);
DrawText(startx, starty, setup.player_name, font_nr);
+
+#if defined(TARGET_SDL2)
+ SDL_StopTextInput();
+#endif
}
}
}
}
@@
-3763,7
+3771,7
@@
static void drawHallOfFameList(int first_entry, int highlight_position)
int font_nr4 = (active ? FONT_TEXT_4_ACTIVE : FONT_TEXT_4);
int dx1 = 3 * getFontWidth(font_nr1);
int dx2 = dx1 + getFontWidth(font_nr1);
int font_nr4 = (active ? FONT_TEXT_4_ACTIVE : FONT_TEXT_4);
int dx1 = 3 * getFontWidth(font_nr1);
int dx2 = dx1 + getFontWidth(font_nr1);
- int dx3 = SXSIZE - 5 * getFontWidth(font_nr4);
+ int dx3 = SXSIZE -
2 * (mSX - SX) -
5 * getFontWidth(font_nr4);
int num_dots = (dx3 - dx2) / getFontWidth(font_nr3);
int sy = mSY + 64 + i * 32;
int num_dots = (dx3 - dx2) / getFontWidth(font_nr3);
int sy = mSY + 64 + i * 32;
@@
-4638,12
+4646,14
@@
static void execSetupChooseMusic()
DrawSetupScreen();
}
DrawSetupScreen();
}
+#if !defined(PLATFORM_ANDROID)
static void execSetupInput()
{
setup_mode = SETUP_MODE_INPUT;
DrawSetupScreen();
}
static void execSetupInput()
{
setup_mode = SETUP_MODE_INPUT;
DrawSetupScreen();
}
+#endif
static void execSetupShortcuts()
{
static void execSetupShortcuts()
{
@@
-5344,10
+5354,12
@@
static void DrawSetupScreen_Generic()
DrawTextSCentered(mSY - SY + 16, FONT_TITLE_1, title_string);
DrawTextSCentered(mSY - SY + 16, FONT_TITLE_1, title_string);
+ // determine maximal number of setup entries that can be displayed on screen
num_setup_info = 0;
num_setup_info = 0;
- for (i = 0; setup_info[i].type != 0 && i <
MAX
_MENU_ENTRIES_ON_SCREEN; i++)
+ for (i = 0; setup_info[i].type != 0 && i <
NUM
_MENU_ENTRIES_ON_SCREEN; i++)
num_setup_info++;
num_setup_info++;
+ // determine maximal number of setup entries available for this setup screen
max_setup_info = 0;
for (i = 0; setup_info[i].type != 0; i++)
max_setup_info++;
max_setup_info = 0;
for (i = 0; setup_info[i].type != 0; i++)
max_setup_info++;