summaryrefslogtreecommitdiff
path: root/src/genworld_gui.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-15 19:54:23 +0000
committertruebrain <truebrain@openttd.org>2011-12-15 19:54:23 +0000
commitdf0afdf0dca6b3d4f621248ada2aed73d7481c66 (patch)
treefe5b1ab9e0e996c53e17d2eb82442b1829e89cbc /src/genworld_gui.cpp
parent2ecbe895093f91bfdecbd8ab29d0641c2fd9a0f3 (diff)
downloadopenttd-df0afdf0dca6b3d4f621248ada2aed73d7481c66.tar.xz
(svn r23525) -Codechange: make Window::flags4 WindowFlags instead of uint16, with only values known in WindowFlags (and move out 2 timers to their own variable)
-Codechange: rename Window::flags4 to Window::flags -Codechange: move some non-inline functions from .hpp to .cpp
Diffstat (limited to 'src/genworld_gui.cpp')
-rw-r--r--src/genworld_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index 455d1ae6f..645dc0b1c 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -639,7 +639,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
case GLAND_START_DATE_DOWN:
case GLAND_START_DATE_UP: // Year buttons
/* Don't allow too fast scrolling */
- if ((this->flags4 & WF_TIMEOUT_MASK) <= WF_TIMEOUT_TRIGGER) {
+ if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
this->HandleButtonClick(widget);
_settings_newgame.game_creation.starting_year = Clamp(_settings_newgame.game_creation.starting_year + widget - GLAND_START_DATE_TEXT, MIN_YEAR, MAX_YEAR);
@@ -657,7 +657,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
case GLAND_SNOW_LEVEL_DOWN:
case GLAND_SNOW_LEVEL_UP: // Snow line buttons
/* Don't allow too fast scrolling */
- if ((this->flags4 & WF_TIMEOUT_MASK) <= WF_TIMEOUT_TRIGGER) {
+ if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
this->HandleButtonClick(widget);
_settings_newgame.game_creation.snow_line_height = Clamp(_settings_newgame.game_creation.snow_line_height + widget - GLAND_SNOW_LEVEL_TEXT, MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT);
@@ -1049,7 +1049,7 @@ struct CreateScenarioWindow : public Window
case CSCEN_START_DATE_DOWN:
case CSCEN_START_DATE_UP: // Year buttons
/* Don't allow too fast scrolling */
- if ((this->flags4 & WF_TIMEOUT_MASK) <= WF_TIMEOUT_TRIGGER) {
+ if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
this->HandleButtonClick(widget);
this->SetDirty();
@@ -1067,7 +1067,7 @@ struct CreateScenarioWindow : public Window
case CSCEN_FLAT_LAND_HEIGHT_DOWN:
case CSCEN_FLAT_LAND_HEIGHT_UP: // Height level buttons
/* Don't allow too fast scrolling */
- if ((this->flags4 & WF_TIMEOUT_MASK) <= WF_TIMEOUT_TRIGGER) {
+ if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
this->HandleButtonClick(widget);
this->SetDirty();