summaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-12-14 16:53:38 +0000
committerdominik <dominik@openttd.org>2004-12-14 16:53:38 +0000
commit719686037319207be3bee5bff879c480b7a89a30 (patch)
treee09e6c8a106ac219b9216044e093bbf41a198c8b /window.c
parent833ce9840929a22f7e8c96ba6dec1f013a3bbe85 (diff)
downloadopenttd-719686037319207be3bee5bff879c480b7a89a30.tar.xz
(svn r1082) Feature: Chat toolbar
- to chat with all players press Return (or Shift-T) and type in the message - Press Return again to send the message
Diffstat (limited to 'window.c')
-rw-r--r--window.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/window.c b/window.c
index c61e6921b..a24afb7c4 100644
--- a/window.c
+++ b/window.c
@@ -554,6 +554,7 @@ Window *AllocateWindowDesc(const WindowDesc *desc)
} else {
if (pt.x == WDP_CENTER) pt.x = (_screen.width - desc->width) >> 1;
if (pt.y == WDP_CENTER) pt.y = (_screen.height - desc->height) >> 1;
+ else if(pt.y < 0) pt.y = _screen.height + pt.y; // if y is negative, it's from the bottom of the screen
}
}
@@ -1366,6 +1367,9 @@ void RelocateAllWindows(int neww, int newh)
} else if (w->window_class == WC_STATUS_BAR) {
top = newh - w->height;
left = (neww - w->width) >> 1;
+ } else if (w->window_class == WC_SEND_NETWORK_MSG) {
+ top = (newh - 26); // 26 = height of status bar + height of chat bar
+ left = (neww - w->width) >> 1;
} else {
left = w->left;
if (left + (w->width>>1) >= neww) left = neww - w->width;