summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-01-09 18:43:47 +0000
committerfrosch <frosch@openttd.org>2011-01-09 18:43:47 +0000
commit91e95dfd5394d6751204a88af328761e65049a09 (patch)
treea15d80e2372f8442c3446c74f998cf0468e5e9d3
parent352fd000eaae16e79b5d9f4ca6081e778d9ec4e8 (diff)
downloadopenttd-91e95dfd5394d6751204a88af328761e65049a09.tar.xz
(svn r21761) -Add: Wheel-scrolling in the new build station GUI.
-rw-r--r--src/rail_gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 8e8a24d2a..6eab2eb4c 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -1443,11 +1443,12 @@ static const NWidgetPart _nested_station_builder_widgets[] = {
EndContainer(),
EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, BRSW_SHOW_NEWST_MATRIX),
- NWidget(NWID_VERTICAL),
+ /* We need an additional background for the matrix, as the matrix cannot handle the scrollbar due to not being an NWidgetCore. */
+ NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetScrollbar(BRSW_MATRIX_SCROLL),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_MATRIX, COLOUR_DARK_GREEN, BRSW_MATRIX), SetScrollbar(BRSW_MATRIX_SCROLL), SetPIP(0, 2, 0), SetPadding(2, 0, 0, 0),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BRSW_IMAGE), SetMinimalSize(66, 60),
- SetFill(0, 0), SetResize(0, 0), SetDataTip(0x0, STR_STATION_BUILD_STATION_TYPE_TOOLTIP),
+ SetFill(0, 0), SetResize(0, 0), SetDataTip(0x0, STR_STATION_BUILD_STATION_TYPE_TOOLTIP), SetScrollbar(BRSW_MATRIX_SCROLL),
EndContainer(),
EndContainer(),
NWidget(NWID_VSCROLLBAR, COLOUR_DARK_GREEN, BRSW_MATRIX_SCROLL),