projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor code change when initializing typing player name
[rocksndiamonds.git]
/
src
/
screens.c
diff --git
a/src/screens.c
b/src/screens.c
index dcbac9163a4c5329b020f8398dda7cff395a65b4..f859a632d65229720f6706c9d861e432ad02af54 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-4147,19
+4147,18
@@
static void HandleTypeNameExt(boolean initialize, Key key)
static struct TextPosInfo pos_name = { 0 };
static char name[MAX_PLAYER_NAME_LEN + 1] = { 0 };
static int xpos = 0;
static struct TextPosInfo pos_name = { 0 };
static char name[MAX_PLAYER_NAME_LEN + 1] = { 0 };
static int xpos = 0;
-
- if (initialize)
- getTypeNameValues(name, &pos_name, &xpos);
-
struct TextPosInfo *pos = &pos_name;
struct TextPosInfo *pos = &pos_name;
- int sx = mSX + ALIGNED_TEXT_XPOS(pos);
- int sy = mSY + ALIGNED_TEXT_YPOS(pos);
char key_char = getValidConfigValueChar(getCharFromKey(key));
boolean is_valid_key_char = (key_char != 0 && (key_char != ' ' || xpos > 0));
boolean is_active = TRUE;
if (initialize)
{
char key_char = getValidConfigValueChar(getCharFromKey(key));
boolean is_valid_key_char = (key_char != 0 && (key_char != ' ' || xpos > 0));
boolean is_active = TRUE;
if (initialize)
{
+ getTypeNameValues(name, pos, &xpos);
+
+ int sx = mSX + ALIGNED_TEXT_XPOS(pos);
+ int sy = mSY + ALIGNED_TEXT_YPOS(pos);
+
StartTextInput(sx, sy, pos->width, pos->height);
}
else if (is_valid_key_char && xpos < MAX_PLAYER_NAME_LEN)
StartTextInput(sx, sy, pos->width, pos->height);
}
else if (is_valid_key_char && xpos < MAX_PLAYER_NAME_LEN)