summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-11-16 15:49:21 +0100
committerErich Eckner <git@eckner.net>2018-11-16 19:12:17 +0100
commit8cfa934c533a8aa06379835e57e4f28abc1f2346 (patch)
tree729123eee929c74fa751987b95160fb15551c8b1 /src
parent7bd8e6c67f1caac99c9aadca791b7edad63d52e7 (diff)
downloadopenttd-8cfa934c533a8aa06379835e57e4f28abc1f2346.tar.xz
began to code multy-layer-build for stationsunderground-station-construction
Diffstat (limited to 'src')
-rw-r--r--src/lang/english.txt6
-rw-r--r--src/rail_gui.cpp9
-rw-r--r--src/road_gui.cpp9
-rw-r--r--src/widgets/rail_widget.h2
-rw-r--r--src/widgets/road_widget.h2
5 files changed, 28 insertions, 0 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index d6a7086ad..946f55c2c 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -2318,6 +2318,12 @@ STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP :{BLACK}Don't hi
STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP :{BLACK}Highlight coverage area of proposed site
STR_STATION_BUILD_ACCEPTS_CARGO :{BLACK}Accepts: {GOLD}{CARGO_LIST}
STR_STATION_BUILD_SUPPLIES_CARGO :{BLACK}Supplies: {GOLD}{CARGO_LIST}
+STR_STATION_BUILD_ELEVATOR_TITLE :{BLACK}Build on all layers
+STR_STATION_BUILD_ELEVATOR_OFF :{BLACK}Off
+STR_STATION_BUILD_ELEVATOR_ON :{BLACK}On
+STR_STATION_BUILD_ELEVATOR_OFF_TOOLTIP :{BLACK}Only build on the current layer
+STR_STATION_BUILD_ELEVATOR_ON_TOOLTIP :{BLACK}Build on all layers
+
# Join station window
STR_JOIN_STATION_CAPTION :{WHITE}Join station
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 5a533e5c5..f7d8dfaa8 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -1440,6 +1440,15 @@ static const NWidgetPart _nested_station_builder_widgets[] = {
SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0),
EndContainer(),
+ NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_ELEVATOR_TITLE, STR_NULL), SetPadding(3, 2, 0, 2),
+ NWidget(NWID_HORIZONTAL),
+ NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0),
+ NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_ELEVATOR_OFF), SetMinimalSize(60, 12),
+ SetDataTip(STR_STATION_BUILD_ELEVATOR_OFF, STR_STATION_BUILD_ELEVATOR_OFF_TOOLTIP),
+ NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_ELEVATOR_ON), SetMinimalSize(60, 12),
+ SetDataTip(STR_STATION_BUILD_ELEVATOR_ON, STR_STATION_BUILD_ELEVATOR_ON_TOOLTIP),
+ NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0),
+ EndContainer(),
EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_BRAS_SHOW_NEWST_MATRIX),
/* We need an additional background for the matrix, as the matrix cannot handle the scrollbar due to not being an NWidgetCore. */
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index 6faa42262..b6847b981 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -1095,6 +1095,15 @@ static const NWidgetPart _nested_road_station_picker_widgets[] = {
SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
NWidget(NWID_SPACER), SetFill(1, 0),
EndContainer(),
+ NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_ELEVATOR_TITLE, STR_NULL), SetPadding(3, 2, 0, 2),
+ NWidget(NWID_HORIZONTAL),
+ NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0),
+ NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BROS_ELEVATOR_OFF), SetMinimalSize(60, 12),
+ SetDataTip(STR_STATION_BUILD_ELEVATOR_OFF, STR_STATION_BUILD_ELEVATOR_OFF_TOOLTIP),
+ NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BROS_ELEVATOR_ON), SetMinimalSize(60, 12),
+ SetDataTip(STR_STATION_BUILD_ELEVATOR_ON, STR_STATION_BUILD_ELEVATOR_ON_TOOLTIP),
+ NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0),
+ EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 10), SetResize(0, 1),
EndContainer(),
};
diff --git a/src/widgets/rail_widget.h b/src/widgets/rail_widget.h
index f977f4480..2351e2096 100644
--- a/src/widgets/rail_widget.h
+++ b/src/widgets/rail_widget.h
@@ -58,6 +58,8 @@ enum BuildRailStationWidgets {
WID_BRAS_HIGHLIGHT_OFF, ///< Button for turning coverage highlighting off.
WID_BRAS_HIGHLIGHT_ON, ///< Button for turning coverage highlighting on.
+ WID_BRAS_ELEVATOR_OFF, ///< Button for turning elevator station off.
+ WID_BRAS_ELEVATOR_ON, ///< Button for turning elevator station on.
WID_BRAS_COVERAGE_TEXTS, ///< Empty space for the coverage texts.
WID_BRAS_MATRIX, ///< Matrix widget displaying the available stations.
diff --git a/src/widgets/road_widget.h b/src/widgets/road_widget.h
index f022489e5..12b71dd42 100644
--- a/src/widgets/road_widget.h
+++ b/src/widgets/road_widget.h
@@ -51,6 +51,8 @@ enum BuildRoadStationWidgets {
WID_BROS_STATION_Y, ///< Drive-through station in y-direction.
WID_BROS_LT_OFF, ///< Turn off area highlight.
WID_BROS_LT_ON, ///< Turn on area highlight.
+ WID_BROS_ELEVATOR_OFF, ///< No elevator station.
+ WID_BROS_ELEVATOR_ON, ///< Elevator station.
WID_BROS_INFO, ///< Station acceptance info.
};