summaryrefslogtreecommitdiff
path: root/genworld_gui.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-10-21 22:50:57 +0000
committerDarkvater <Darkvater@openttd.org>2006-10-21 22:50:57 +0000
commitfcd2af4643b4a68e175243f31cc88cea26f2bf4e (patch)
tree34b54ccc365c7e78b67c42eb083c2b239062455d /genworld_gui.c
parentf71ca30040cd2046b0734703c86eec981603833b (diff)
downloadopenttd-fcd2af4643b4a68e175243f31cc88cea26f2bf4e.tar.xz
(svn r6879) -Codechange: Remove the superflouos argument CharsetFilter parameter from HandleEditBoxKey
as the same information is present in querystr_d->afilter -Also (&((querystr_d *)&WP(w, querystr_d))->text is the same as &WP(w, querystr_d).text
Diffstat (limited to 'genworld_gui.c')
-rw-r--r--genworld_gui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/genworld_gui.c b/genworld_gui.c
index 36f7473a5..304540fc6 100644
--- a/genworld_gui.c
+++ b/genworld_gui.c
@@ -321,7 +321,7 @@ void GenerateLandscapeWndProc(Window *w, WindowEvent *e)
case 16: // Random seed
_patches_newgame.generation_seed = InteractiveRandom();
ttd_strlcpy(_edit_str_buf, str_fmt("%u", _patches_newgame.generation_seed), lengthof(_edit_str_buf));
- UpdateTextBufferSize(&((querystr_d *)&WP(w, querystr_d))->text);
+ UpdateTextBufferSize(&WP(w, querystr_d).text);
SetWindowDirty(w);
break;
case 17: // Generate
@@ -395,7 +395,7 @@ void GenerateLandscapeWndProc(Window *w, WindowEvent *e)
break;
case WE_KEYPRESS:
- HandleEditBoxKey(w, &WP(w, querystr_d), SEED_EDIT, e, CS_NUMERAL);
+ HandleEditBoxKey(w, &WP(w, querystr_d), SEED_EDIT, e);
/* the seed is unsigned, therefore atoi cannot be used.
* As 2^32 - 1 (MAX_UVALUE(uint32)) is a 'magic' value
* (use random seed) it should not be possible to be
@@ -518,6 +518,7 @@ static void _ShowGenerateLandscape(glwp_modes mode)
querystr->text.maxwidth = 120;
querystr->text.buf = _edit_str_buf;
querystr->caption = STR_NULL;
+ querystr->afilter = CS_NUMERAL;
UpdateTextBufferSize(&querystr->text);
InvalidateWindow(WC_GENERATE_LANDSCAPE, mode);