summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2011-10-11 08:07:47 +0000
committerpeter1138 <peter1138@openttd.org>2011-10-11 08:07:47 +0000
commit50d15412705fa8ffb37e53afd798595e74073f0d (patch)
treeadd2c1787d5cc71bb594b03912c5a1e078354b2b /src/network
parent719f6618d773a5ad848920949b0470122080ac37 (diff)
downloadopenttd-50d15412705fa8ffb37e53afd798595e74073f0d.tar.xz
(svn r23017) -Codechange: Add support for resized scrollbars.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_gui.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index de8fadae1..1bdef4b55 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -97,6 +97,7 @@ enum NetworkGameWindowWidgets {
NGWW_LASTJOINED_LABEL, ///< Label "Last joined server:"
NGWW_LASTJOINED, ///< Info about the last joined server
+ NGWW_LASTJOINED_SPACER, ///< Spacer after last joined server panel
NGWW_DETAILS, ///< Panel with game details
NGWW_DETAILS_SPACER, ///< Spacer for game actual details
@@ -509,6 +510,10 @@ public:
size->height = WD_MATRIX_TOP + FONT_HEIGHT_NORMAL + WD_MATRIX_BOTTOM;
break;
+ case NGWW_LASTJOINED_SPACER:
+ size->width = NWidgetScrollbar::GetVerticalDimension().width;
+ break;
+
case NGWW_NAME:
size->width += 2 * WD_SORTBUTTON_ARROW_WIDTH; // Make space for the arrow
break;
@@ -943,10 +948,11 @@ static const NWidgetPart _nested_network_game_widgets[] = {
NWidget(NWID_SPACER), SetMinimalSize(0, 7), SetResize(1, 0), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_LIGHT_BLUE, NGWW_LASTJOINED_LABEL), SetFill(1, 0),
SetDataTip(STR_NETWORK_SERVER_LIST_LAST_JOINED_SERVER, STR_NULL), SetResize(1, 0),
- NWidget(NWID_HORIZONTAL), SetPIP(0, 0, WD_VSCROLLBAR_WIDTH),
+ NWidget(NWID_HORIZONTAL),
NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE, NGWW_LASTJOINED), SetFill(1, 0), SetResize(1, 0),
SetDataTip(0x0, STR_NETWORK_SERVER_LIST_CLICK_TO_SELECT_LAST),
EndContainer(),
+ NWidget(WWT_EMPTY, INVALID_COLOUR, NGWW_LASTJOINED_SPACER), SetFill(0, 0),
EndContainer(),
EndContainer(),
/* RIGHT SIDE */