diff options
author | Darkvater <darkvater@openttd.org> | 2006-10-24 22:57:44 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-10-24 22:57:44 +0000 |
commit | b63d9468984c2dd52461e61c90b52274373b8c43 (patch) | |
tree | f1b49fed0bd10b13082a8846aac259e173795f64 /genworld_gui.c | |
parent | 3760fe9a409ce304b1b8d2d9821d32b5916d5a8e (diff) | |
download | openttd-b63d9468984c2dd52461e61c90b52274373b8c43.tar.xz |
(svn r6937) -Codechange: Add an InitializeTextBuffer() function that handles setting up the
textbuffer instead of typing it out each and every time.
Diffstat (limited to 'genworld_gui.c')
-rw-r--r-- | genworld_gui.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/genworld_gui.c b/genworld_gui.c index 4d7e7c2a0..ee18fb227 100644 --- a/genworld_gui.c +++ b/genworld_gui.c @@ -513,13 +513,9 @@ static void _ShowGenerateLandscape(glwp_modes mode) ttd_strlcpy(_edit_str_buf, str_fmt("%u", _patches_newgame.generation_seed), lengthof(_edit_str_buf)); - querystr->text.caret = true; - querystr->text.maxlength = lengthof(_edit_str_buf); - querystr->text.maxwidth = 120; - querystr->text.buf = _edit_str_buf; + InitializeTextBuffer(&querystr->text, _edit_str_buf, lengthof(_edit_str_buf), 120); querystr->caption = STR_NULL; querystr->afilter = CS_NUMERAL; - UpdateTextBufferSize(&querystr->text); InvalidateWindow(WC_GENERATE_LANDSCAPE, mode); } |