diff options
author | Darkvater <darkvater@openttd.org> | 2007-03-02 17:54:52 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2007-03-02 17:54:52 +0000 |
commit | 0961e1bc5659e6ec7db517c35efaf1e457441cef (patch) | |
tree | 77321c1e07bbc204134993145a176686153a6eb7 /src/news_gui.cpp | |
parent | 991fbeaefabde6cbe8cdb03cc4a296f1a5908c42 (diff) | |
download | openttd-0961e1bc5659e6ec7db517c35efaf1e457441cef.tar.xz |
(svn r8977) -Codechange: Remove the hardcoded maximum width for some drawstrings and replace them with a portion of w->width. Only visible improvement is QueryWndProc which will not write exactly to the edge of the window anymore.
Diffstat (limited to 'src/news_gui.cpp')
-rw-r--r-- | src/news_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp index ce8355391..fce196197 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -135,7 +135,7 @@ static void NewsWindowProc(Window *w, WindowEvent *e) if (!(ni->flags & NF_VIEWPORT)) { COPY_IN_DPARAM(0, ni->params, lengthof(ni->params)); DrawStringMultiCenter(215, ni->display_mode == NM_NORMAL ? 76 : 56, - ni->string_id, 426); + ni->string_id, w->width - 4); } else { byte bk = _display_opt; _display_opt &= ~DO_TRANS_BUILDINGS; @@ -150,7 +150,7 @@ static void NewsWindowProc(Window *w, WindowEvent *e) ); COPY_IN_DPARAM(0, ni->params, lengthof(ni->params)); - DrawStringMultiCenter(w->width / 2, 20, ni->string_id, 428); + DrawStringMultiCenter(w->width / 2, 20, ni->string_id, w->width - 4); } break; } @@ -168,7 +168,7 @@ static void NewsWindowProc(Window *w, WindowEvent *e) } else { DrawWindowViewport(w); COPY_IN_DPARAM(0, ni->params, lengthof(ni->params)); - DrawStringMultiCenter(w->width / 2, w->height - 16, ni->string_id, 276); + DrawStringMultiCenter(w->width / 2, w->height - 16, ni->string_id, w->width - 4); } break; } |