diff options
author | alberth <alberth@openttd.org> | 2009-08-14 19:02:20 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-08-14 19:02:20 +0000 |
commit | c4f055cc1158a50b98db5f94ed4859619f37b37b (patch) | |
tree | fb72ed1c974f0ac342bdd27050231668743b5305 /src | |
parent | 4eb155ccfb3c50892ad9c19d07921880851d943c (diff) | |
download | openttd-c4f055cc1158a50b98db5f94ed4859619f37b37b.tar.xz |
(svn r17172) -Codechange: Move the _message_opt variable into the MessageOptionsWindow struct.
Diffstat (limited to 'src')
-rw-r--r-- | src/news_gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 4c73c7223..b0207ad61 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -938,9 +938,8 @@ enum NewsSettingsWidgets { WIDGET_NEWSOPT_START_OPTION, ///< First widget that is part of a group [<] .. [.] }; -static const StringID _message_opt[] = {STR_NEWS_MESSAGES_OFF, STR_NEWS_MESSAGES_SUMMARY, STR_NEWS_MESSAGES_FULL, INVALID_STRING_ID}; - struct MessageOptionsWindow : Window { + static const StringID message_opt[]; ///< Message report options, 'off', 'summary', or 'full'. int state; ///< Option value for setting all categories at once. MessageOptionsWindow(const WindowDesc *desc) : Window(desc) @@ -980,13 +979,13 @@ struct MessageOptionsWindow : Window { { if (_news_ticker_sound) this->LowerWidget(WIDGET_NEWSOPT_SOUNDTICKER); - this->widget[WIDGET_NEWSOPT_DROP_SUMMARY].data = _message_opt[this->state]; + this->widget[WIDGET_NEWSOPT_DROP_SUMMARY].data = this->message_opt[this->state]; this->DrawWidgets(); /* Draw the string of each setting on each button. */ for (int i = 0; i < NT_END; i++) { DrawString(this->widget[WIDGET_NEWSOPT_START_OPTION + 1].left, this->widget[WIDGET_NEWSOPT_START_OPTION + 1].right, - this->widget[WIDGET_NEWSOPT_START_OPTION + NB_WIDG_PER_SETTING * i + 1].top + 1, _message_opt[_news_type_data[i].display], TC_BLACK, SA_CENTER); + this->widget[WIDGET_NEWSOPT_START_OPTION + NB_WIDG_PER_SETTING * i + 1].top + 1, this->message_opt[_news_type_data[i].display], TC_BLACK, SA_CENTER); } } @@ -994,7 +993,7 @@ struct MessageOptionsWindow : Window { { switch (widget) { case WIDGET_NEWSOPT_DROP_SUMMARY: // Dropdown menu for all settings - ShowDropDownMenu(this, _message_opt, this->state, WIDGET_NEWSOPT_DROP_SUMMARY, 0, 0); + ShowDropDownMenu(this, this->message_opt, this->state, WIDGET_NEWSOPT_DROP_SUMMARY, 0, 0); break; case WIDGET_NEWSOPT_SOUNDTICKER: // Change ticker sound on/off @@ -1030,6 +1029,7 @@ struct MessageOptionsWindow : Window { } }; +const StringID MessageOptionsWindow::message_opt[] = {STR_NEWS_MESSAGES_OFF, STR_NEWS_MESSAGES_SUMMARY, STR_NEWS_MESSAGES_FULL, INVALID_STRING_ID}; /* * The news settings window widgets |