diff options
author | alberth <alberth@openttd.org> | 2009-07-25 11:54:53 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-07-25 11:54:53 +0000 |
commit | e3033ee895d8d621ffe2bb115b2293206db0e52f (patch) | |
tree | 8bf38b6bf210fb0fa73272deefb61347b14aba89 /src/intro_gui.cpp | |
parent | e5bfc5660d35e408de764cde63bf376fbade37c5 (diff) | |
download | openttd-e3033ee895d8d621ffe2bb115b2293206db0e52f.tar.xz |
(svn r16953) -Codechange: Use SetStringParameters() for simple parameterized strings.
Diffstat (limited to 'src/intro_gui.cpp')
-rw-r--r-- | src/intro_gui.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index 9b2c8511b..36989926a 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -75,12 +75,9 @@ struct SelectGameWindow : public Window { this->DrawWidgets(); } - virtual void DrawWidget(const Rect &r, int widget) const + virtual void SetStringParameters(int widget) const { - if (widget == SGI_DIFFICULTIES) { - SetDParam(0, STR_DIFFICULTY_LEVEL_EASY + _settings_newgame.difficulty.diff_level); - DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, STR_INTRO_DIFFICULTY, TC_FROMSTRING, SA_CENTER); - } + if (widget == SGI_DIFFICULTIES) SetDParam(0, STR_DIFFICULTY_LEVEL_EASY + _settings_newgame.difficulty.diff_level); } virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize) @@ -211,7 +208,7 @@ static const NWidgetPart _nested_select_game_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_OPTIONS), SetMinimalSize(158, 12), SetDataTip(STR_INTRO_GAME_OPTIONS, STR_INTRO_TOOLTIP_GAME_OPTIONS), SetPadding(0, 0, 0, 10), SetFill(1, 0), NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_DIFFICULTIES), SetMinimalSize(158, 12), - SetDataTip(STR_NULL, STR_INTRO_TOOLTIP_DIFFICULTY_OPTIONS), SetPadding(0, 10, 0, 0), SetFill(1, 0), + SetDataTip(STR_INTRO_DIFFICULTY, STR_INTRO_TOOLTIP_DIFFICULTY_OPTIONS), SetPadding(0, 10, 0, 0), SetFill(1, 0), EndContainer(), NWidget(NWID_SPACER), SetMinimalSize(0, 6), |