summaryrefslogtreecommitdiff
path: root/src/news_gui.cpp
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2007-03-02 17:54:52 +0000
committerDarkvater <Darkvater@openttd.org>2007-03-02 17:54:52 +0000
commit27fc1300e21c511d674469850ba9ed989709b8aa (patch)
tree77321c1e07bbc204134993145a176686153a6eb7 /src/news_gui.cpp
parente3dff16b21b630c27c5d08fc8e132432ae9110b1 (diff)
downloadopenttd-27fc1300e21c511d674469850ba9ed989709b8aa.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.cpp6
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;
}