diff options
author | belugas <belugas@openttd.org> | 2007-11-04 00:08:57 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2007-11-04 00:08:57 +0000 |
commit | 56e6282f2f56d741634e30bba86fcfbd941bc285 (patch) | |
tree | 14a742a306f14c4d3afd56b725a7c6ffe7fb0e73 /src/news_gui.cpp | |
parent | 9e69fc8114012c85cc1194a2ae73fb716dc95dde (diff) | |
download | openttd-56e6282f2f56d741634e30bba86fcfbd941bc285.tar.xz |
(svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
Patch heavily based on BiBB's work (FS#1383)
Diffstat (limited to 'src/news_gui.cpp')
-rw-r--r-- | src/news_gui.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 3af2b27f5..a8d8b0e36 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -106,7 +106,7 @@ void DrawNewsBorder(const Window *w) GfxFillRect(left, top, right, top, 0xD7); GfxFillRect(left, bottom, right, bottom, 0xD7); - DrawString(left + 2, top + 1, STR_00C6, 0); + DrawString(left + 2, top + 1, STR_00C6, TC_FROMSTRING); } static void NewsWindowProc(Window *w, WindowEvent *e) @@ -126,10 +126,10 @@ static void NewsWindowProc(Window *w, WindowEvent *e) case NM_THIN: { DrawNewsBorder(w); - DrawString(2, 1, STR_00C6, 0); + DrawString(2, 1, STR_00C6, TC_FROMSTRING); SetDParam(0, ni->date); - DrawStringRightAligned(428, 1, STR_01FF, 0); + DrawStringRightAligned(428, 1, STR_01FF, TC_FROMSTRING); if (!(ni->flags & NF_VIEWPORT)) { CopyInDParam(0, ni->params, lengthof(ni->params)); @@ -704,9 +704,9 @@ static void MessageHistoryWndProc(Window *w, WindowEvent *e) const NewsItem *ni = &_news_items[getNews(p)]; SetDParam(0, ni->date); - DrawString(4, y, STR_SHORT_DATE, 12); + DrawString(4, y, STR_SHORT_DATE, TC_WHITE); - DrawNewsString(82, y, 12, ni, w->width - 95); + DrawNewsString(82, y, TC_WHITE, ni, w->width - 95); y += 12; } break; @@ -832,11 +832,11 @@ static void MessageOptionsWndProc(Window *w, WindowEvent *e) for (i = 0, y = 26; i < NT_END; i++, y += 12, val >>= 2) { /* 51 comes from 13 + 89 (left and right of the button)+1, shiefted by one as to get division, * which will give centered position */ - DrawStringCentered(51, y + 1, message_opt[val & 0x3], 0x10); + DrawStringCentered(51, y + 1, message_opt[val & 0x3], TC_BLACK); } /* Draw the general bottom button string as well */ - DrawStringCentered(51, y + 10, message_opt[WP(w, def_d).data_1], 0x10); + DrawStringCentered(51, y + 10, message_opt[WP(w, def_d).data_1], TC_BLACK); } break; case WE_CLICK: |