summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-12-13 23:26:00 +0000
committerrubidium <rubidium@openttd.org>2007-12-13 23:26:00 +0000
commit2921e7482bcced7865aad691459d6e80606b76ce (patch)
tree25f0623bc7c9ae95c5e18e2646fcf2bbbcbc2b6b /src
parenta0f2366e4052dbcdfcd5931b60104efdcf8ba83e (diff)
downloadopenttd-2921e7482bcced7865aad691459d6e80606b76ce.tar.xz
(svn r11630) -Fix [FS#1544] (r11556): the chat GUI got broken.
Diffstat (limited to 'src')
-rw-r--r--src/network/network_gui.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 1391030b2..821114bbb 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -1794,11 +1794,23 @@ static void ChatWindowWndProc(Window *w, WindowEvent *e)
{
switch (e->event) {
case WE_CREATE:
+ SendWindowMessage(WC_NEWS_WINDOW, 0, WE_CREATE, w->height, 0);
+ SetBit(_no_scroll, SCROLL_CHAT); // do not scroll the game with the arrow-keys
break;
case WE_PAINT: {
+ static const StringID chat_captions[] = {
+ STR_NETWORK_CHAT_ALL_CAPTION,
+ STR_NETWORK_CHAT_COMPANY_CAPTION,
+ STR_NETWORK_CHAT_CLIENT_CAPTION
+ };
+ StringID msg;
+
DrawWindowWidgets(w);
+ assert(WP(w, chatquerystr_d).caption < lengthof(chat_captions));
+ msg = chat_captions[WP(w, chatquerystr_d).caption];
+ DrawStringRightAligned(w->widget[2].left - 2, w->widget[2].top + 1, msg, TC_BLACK);
DrawEditBox(w, &WP(w, chatquerystr_d), 2);
} break;