Mercurial > hg > openttd
changeset 11919:5a02b0ed51bc draft
(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.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 16 May 2009 18:58:15 +0000 |
parents | 323d58de54b0 |
children | 06375a564163 |
files | src/toolbar_gui.cpp |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -784,8 +784,8 @@ 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 @@ 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 @@ 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 @@ 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 */