summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-16 18:58:15 +0000
committerrubidium <rubidium@openttd.org>2009-05-16 18:58:15 +0000
commitbdbbe3a09b05af55e25008890e7485a7b34aeaa4 (patch)
treebfa528653e0753587a0f1705ab8c4f4115509601
parentaff7a9e953a1b80d0902c4a47420affee47e8ece (diff)
downloadopenttd-bdbbe3a09b05af55e25008890e7485a7b34aeaa4.tar.xz
(svn r16321) -Fix (r5946): in the scenario editor change the (starting) game year of the scenario, not the (starting) game year for new games/scenarios.
-rw-r--r--src/toolbar_gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp
index 93e22bb24..07907e0e1 100644
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -784,8 +784,8 @@ static void ToolbarScenDateBackward(Window *w)
w->HandleButtonClick(TBSE_DATEBACKWARD);
w->SetDirty();
- _settings_newgame.game_creation.starting_year = Clamp(_settings_newgame.game_creation.starting_year - 1, MIN_YEAR, MAX_YEAR);
- SetDate(ConvertYMDToDate(_settings_newgame.game_creation.starting_year, 0, 1));
+ _settings_game.game_creation.starting_year = Clamp(_settings_game.game_creation.starting_year - 1, MIN_YEAR, MAX_YEAR);
+ SetDate(ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1));
}
_left_button_clicked = false;
}
@@ -797,8 +797,8 @@ static void ToolbarScenDateForward(Window *w)
w->HandleButtonClick(TBSE_DATEFORWARD);
w->SetDirty();
- _settings_newgame.game_creation.starting_year = Clamp(_settings_newgame.game_creation.starting_year + 1, MIN_YEAR, MAX_YEAR);
- SetDate(ConvertYMDToDate(_settings_newgame.game_creation.starting_year, 0, 1));
+ _settings_game.game_creation.starting_year = Clamp(_settings_game.game_creation.starting_year + 1, MIN_YEAR, MAX_YEAR);
+ SetDate(ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1));
}
_left_button_clicked = false;
}
@@ -1233,8 +1233,8 @@ public:
virtual void OnPaint()
{
- this->SetWidgetDisabledState(TBSE_DATEBACKWARD, _settings_newgame.game_creation.starting_year <= MIN_YEAR);
- this->SetWidgetDisabledState(TBSE_DATEFORWARD, _settings_newgame.game_creation.starting_year >= MAX_YEAR);
+ this->SetWidgetDisabledState(TBSE_DATEBACKWARD, _settings_game.game_creation.starting_year <= MIN_YEAR);
+ this->SetWidgetDisabledState(TBSE_DATEFORWARD, _settings_game.game_creation.starting_year >= MAX_YEAR);
/* Draw brown-red toolbar bg. */
GfxFillRect(0, 0, this->width - 1, this->height - 1, 0xB2);
@@ -1242,7 +1242,7 @@ public:
this->DrawWidgets();
- SetDParam(0, ConvertYMDToDate(_settings_newgame.game_creation.starting_year, 0, 1));
+ SetDParam(0, ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1));
DrawString(this->widget[TBSE_DATEBACKWARD].right, this->widget[TBSE_DATEFORWARD].left, 6, STR_DATE_LONG_WHITE, TC_FROMSTRING, SA_CENTER);
/* We hide this panel when the toolbar space gets too small */