From 50d15412705fa8ffb37e53afd798595e74073f0d Mon Sep 17 00:00:00 2001 From: peter1138 Date: Tue, 11 Oct 2011 08:07:47 +0000 Subject: (svn r23017) -Codechange: Add support for resized scrollbars. --- src/network/network_gui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/network') 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 */ -- cgit v1.2.3-70-g09d2