diff options
author | rubidium <rubidium@openttd.org> | 2008-05-17 23:11:06 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-17 23:11:06 +0000 |
commit | d284ba228327b83b74a5bf2448406f9021f67c8b (patch) | |
tree | cdbaf12f7c5a7666ecc23983c51dca268e3b58e2 /src/genworld_gui.cpp | |
parent | b101faea201219afd52f6a743dad244c1c33b991 (diff) | |
download | openttd-d284ba228327b83b74a5bf2448406f9021f67c8b.tar.xz |
(svn r13151) -Codechange: use an enum instead of bool as return type of OnKeyPress/OnCTRLStateChange to make it obvious what the return values mean.
Diffstat (limited to 'src/genworld_gui.cpp')
-rw-r--r-- | src/genworld_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index ba6f1f3d2..446762959 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -470,17 +470,17 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { this->HandleEditBox(GLAND_RANDOM_EDITBOX); } - virtual bool OnKeyPress(uint16 key, uint16 keycode) + virtual EventState OnKeyPress(uint16 key, uint16 keycode) { - bool cont; - this->HandleEditBoxKey(GLAND_RANDOM_EDITBOX, key, keycode, cont); + EventState state; + this->HandleEditBoxKey(GLAND_RANDOM_EDITBOX, key, keycode, state); /* 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 * entered into the input field; the generate seed * button can be used instead. */ _patches_newgame.generation_seed = minu(strtoul(this->edit_str_buf, NULL, sizeof(this->edit_str_buf) - 1), MAX_UVALUE(uint32) - 1); - return cont; + return state; } virtual void OnDropdownSelect(int widget, int index) |