summaryrefslogtreecommitdiff
path: root/src/genworld_gui.cpp
diff options
context:
space:
mode:
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();