projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug with text input gadgets when pressing "Escape" key
[rocksndiamonds.git]
/
src
/
libgame
/
gadgets.c
diff --git
a/src/libgame/gadgets.c
b/src/libgame/gadgets.c
index 56c359bcc1a0e636c658430e578ef1e5f6e169e5..f84815b0effb46f94ab5bc4f399e6a84f7864b73 100644
(file)
--- a/
src/libgame/gadgets.c
+++ b/
src/libgame/gadgets.c
@@
-2230,8
+2230,12
@@
boolean HandleGadgetsKeyInput(Key key)
{
// restore previous text (before activating text gadget)
if (gi->type & GD_TYPE_TEXT_INPUT)
{
// restore previous text (before activating text gadget)
if (gi->type & GD_TYPE_TEXT_INPUT)
+ {
strcpy(gi->textinput.value, gi->textinput.last_value);
strcpy(gi->textinput.value, gi->textinput.last_value);
+ CheckRangeOfNumericInputGadget(gi);
+ }
+
DrawGadget(gi, DG_UNPRESSED, gi->direct_draw);
last_gi = NULL;
DrawGadget(gi, DG_UNPRESSED, gi->direct_draw);
last_gi = NULL;