summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-05-02 16:40:26 +0000
committeralberth <alberth@openttd.org>2009-05-02 16:40:26 +0000
commitc3c527c9b8d658f26c99ce40211700b0f957174c (patch)
treec24168aabab32a494efe70b9dd11b1c9d377516e /src
parent37afd58fdbc904f017770e401c51d7f4516b49a7 (diff)
downloadopenttd-c3c527c9b8d658f26c99ce40211700b0f957174c.tar.xz
(svn r16202) -Codechange: Use widget top coordinate instead of hardcoded value.
Diffstat (limited to 'src')
-rw-r--r--src/news_gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index 5820795d8..e2cc155ac 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -869,8 +869,9 @@ struct MessageOptionsWindow : Window {
this->DrawWidgets();
/* Draw the string of each setting on each button. */
- for (int i = 0, y = 26; i < NT_END; i++, y += 12) {
- DrawString(this->widget[WIDGET_NEWSOPT_START_OPTION + 1].left, this->widget[WIDGET_NEWSOPT_START_OPTION + 1].right, y + 1, _message_opt[_news_type_data[i].display], TC_BLACK, SA_CENTER);
+ 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);
}
}