Mercurial > hg > openttd
changeset 7029:ce8b6783be37 draft
(svn r10293) -Add [FS#885]: a sticky button for the client list window (oxygene)
author | truelight <truelight@openttd.org> |
---|---|
date | Sat, 23 Jun 2007 14:13:05 +0000 |
parents | 6d5e82df03c4 |
children | 8693666e3dc8 |
files | src/network/network_gui.cpp |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1047,7 +1047,8 @@ 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 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 @@ 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;