diff options
author | rubidium <rubidium@openttd.org> | 2007-07-29 19:19:30 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-29 19:19:30 +0000 |
commit | 000b582423e26a7be53e6848b33d74306eb5f0a0 (patch) | |
tree | e4d4604ee64935f479be9ecc8932383799a0a549 | |
parent | 17370d5ae7db88664dddf561ca7247d33d74fbcf (diff) | |
download | openttd-000b582423e26a7be53e6848b33d74306eb5f0a0.tar.xz |
(svn r10726) -Codechange: make it possible that the chat window is less than 640 pixels.
-rw-r--r-- | src/network/network_gui.cpp | 10 | ||||
-rw-r--r-- | src/window.cpp | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 25ec0fdb0..a8fc55a09 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1717,15 +1717,15 @@ static void ChatWindowWndProc(Window *w, WindowEvent *e) } static const Widget _chat_window_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_PANEL, RESIZE_NONE, 14, 11, 639, 0, 13, 0x0, STR_NULL}, // background -{ WWT_PANEL, RESIZE_NONE, 14, 75, 577, 1, 12, 0x0, STR_NULL}, // text box -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 578, 639, 1, 12, STR_NETWORK_SEND, STR_NULL}, // send button +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_PANEL, RESIZE_RIGHT, 14, 11, 319, 0, 13, 0x0, STR_NULL}, // background +{ WWT_PANEL, RESIZE_RIGHT, 14, 75, 257, 1, 12, 0x0, STR_NULL}, // text box +{ WWT_PUSHTXTBTN, RESIZE_LR, 14, 258, 319, 1, 12, STR_NETWORK_SEND, STR_NULL}, // send button { WIDGETS_END}, }; static const WindowDesc _chat_window_desc = { - WDP_CENTER, -26, 640, 14, 640, 14, // x, y, width, height + WDP_CENTER, -26, 320, 14, 640, 14, // x, y, width, height WC_SEND_NETWORK_MSG, WC_NONE, WDF_STD_TOOLTIPS | WDF_DEF_WIDGET, _chat_window_widgets, diff --git a/src/window.cpp b/src/window.cpp index 0427dd309..e8a6b8802 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2082,6 +2082,7 @@ void RelocateAllWindows(int neww, int newh) break; case WC_SEND_NETWORK_MSG: + ResizeWindow(w, clamp(neww, 320, 640) - w->width, 0); top = (newh - 26); // 26 = height of status bar + height of chat bar left = (neww - w->width) >> 1; break; |