(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
This commit is contained in:
truebrain
2011-12-15 19:54:23 +00:00
parent 2ecbe89509
commit df0afdf0dc
20 changed files with 132 additions and 107 deletions

View File

@@ -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();