diff options
author | peter1138 <peter1138@openttd.org> | 2011-10-11 08:07:47 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2011-10-11 08:07:47 +0000 |
commit | 50d15412705fa8ffb37e53afd798595e74073f0d (patch) | |
tree | add2c1787d5cc71bb594b03912c5a1e078354b2b /src/network | |
parent | 719f6618d773a5ad848920949b0470122080ac37 (diff) | |
download | openttd-50d15412705fa8ffb37e53afd798595e74073f0d.tar.xz |
(svn r23017) -Codechange: Add support for resized scrollbars.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_gui.cpp | 8 |
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 */ |