diff options
author | Darkvater <darkvater@openttd.org> | 2006-10-21 22:50:57 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-10-21 22:50:57 +0000 |
commit | e550bccf15bb423f135e4a3c07aae9f29a53207a (patch) | |
tree | 34b54ccc365c7e78b67c42eb083c2b239062455d /genworld_gui.c | |
parent | c12a9e19c33f7a98a0f290d7cff9f02556b10fed (diff) | |
download | openttd-e550bccf15bb423f135e4a3c07aae9f29a53207a.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.c | 5 |
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); |