From dc77647ea4a2becac4eff3190970cb35671b0131 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 25 May 2008 19:17:03 +0000 Subject: (svn r13251) -Codechange: rename _patches to _settings as that is more logic. -Codechange: move all Settings into substructs of _settings in a way that they are logically grouped. --- src/toolbar_gui.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/toolbar_gui.cpp') diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 6377d4909..1285ea34a 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -542,8 +542,8 @@ static void ToolbarScenDateBackward(Window *w) w->HandleButtonClick(6); w->SetDirty(); - _patches_newgame.starting_year = Clamp(_patches_newgame.starting_year - 1, MIN_YEAR, MAX_YEAR); - SetDate(ConvertYMDToDate(_patches_newgame.starting_year, 0, 1)); + _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)); } _left_button_clicked = false; } @@ -555,8 +555,8 @@ static void ToolbarScenDateForward(Window *w) w->HandleButtonClick(7); w->SetDirty(); - _patches_newgame.starting_year = Clamp(_patches_newgame.starting_year + 1, MIN_YEAR, MAX_YEAR); - SetDate(ConvertYMDToDate(_patches_newgame.starting_year, 0, 1)); + _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)); } _left_button_clicked = false; } @@ -905,8 +905,8 @@ struct ScenarioEditorToolbarWindow : Window { virtual void OnPaint() { - this->SetWidgetDisabledState(6, _patches_newgame.starting_year <= MIN_YEAR); - this->SetWidgetDisabledState(7, _patches_newgame.starting_year >= MAX_YEAR); + this->SetWidgetDisabledState(6, _settings_newgame.game_creation.starting_year <= MIN_YEAR); + this->SetWidgetDisabledState(7, _settings_newgame.game_creation.starting_year >= MAX_YEAR); /* Draw brown-red toolbar bg. */ GfxFillRect(0, 0, this->width - 1, this->height - 1, 0xB2); @@ -914,7 +914,7 @@ struct ScenarioEditorToolbarWindow : Window { this->DrawWidgets(); - SetDParam(0, ConvertYMDToDate(_patches_newgame.starting_year, 0, 1)); + SetDParam(0, ConvertYMDToDate(_settings_newgame.game_creation.starting_year, 0, 1)); DrawStringCenteredTruncated(this->widget[6].right, this->widget[7].left, 6, STR_00AF, TC_FROMSTRING); /* We hide this panel when the toolbar space gets too small */ -- cgit v1.2.3-54-g00ecf