summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-06-23 14:13:05 +0000
committertruelight <truelight@openttd.org>2007-06-23 14:13:05 +0000
commit292a75a5ec514827e2aaeca696c7a9f6934e7a3f (patch)
tree644845d82938653761c57a51c7c6af23ce667f64
parente494b4021f7193ff1d0197921c5741e058cd64b2 (diff)
downloadopenttd-292a75a5ec514827e2aaeca696c7a9f6934e7a3f.tar.xz
(svn r10293) -Add [FS#885]: a sticky button for the client list window (oxygene)
-rw-r--r--src/network/network_gui.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 10fa2b4dd..5d575c32d 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -1047,7 +1047,8 @@ enum {
static const Widget _client_list_widgets[] = {
{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
-{ WWT_CAPTION, RESIZE_NONE, 14, 11, 249, 0, 13, STR_NETWORK_CLIENT_LIST, STR_018C_WINDOW_TITLE_DRAG_THIS},
+{ WWT_CAPTION, RESIZE_NONE, 14, 11, 237, 0, 13, STR_NETWORK_CLIENT_LIST, STR_018C_WINDOW_TITLE_DRAG_THIS},
+{ WWT_STICKYBOX, RESIZE_NONE, 14, 238, 249, 0, 13, STR_NULL, STR_STICKY_BUTTON},
{ WWT_PANEL, RESIZE_NONE, 14, 0, 249, 14, 14 + CLNWND_ROWSIZE + 1, 0x0, STR_NULL},
{ WIDGETS_END},
@@ -1061,7 +1062,7 @@ static const Widget _client_list_popup_widgets[] = {
static WindowDesc _client_list_desc = {
WDP_AUTO, WDP_AUTO, 250, 1,
WC_CLIENT_LIST, WC_NONE,
- WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
+ WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
_client_list_widgets,
ClientListWndProc
};
@@ -1157,7 +1158,7 @@ static bool CheckClientListHeight(Window *w)
if (w->height != CLNWND_OFFSET + num + 1) {
// XXX - magic unfortunately; (num + 2) has to be one bigger than heigh (num + 1)
SetWindowDirty(w);
- w->widget[2].bottom = w->widget[2].top + num + 2;
+ w->widget[3].bottom = w->widget[3].top + num + 2;
w->height = CLNWND_OFFSET + num + 1;
SetWindowDirty(w);
return false;