summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-11-06 10:32:55 +0100
committerErich Eckner <git@eckner.net>2022-01-16 21:58:16 +0100
commit13746fad4eaf371501e09b5e4818d9cf4a353baf (patch)
tree3fc11a4808ac35975460441b577735c7e8b82a34
parent94e9383935c0d2b12d067748b18c757f73a93fad (diff)
downloadopenttd-13746fad4eaf371501e09b5e4818d9cf4a353baf.tar.xz
only show layer switches for available layers
-rw-r--r--layer.txt2
-rw-r--r--src/toolbar_gui.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/layer.txt b/layer.txt
index 9f5c75ab5..f8f2662c2 100644
--- a/layer.txt
+++ b/layer.txt
@@ -36,7 +36,7 @@ GUI
* menu template for management / construction
+ add selection of number of layers
-- only show layer switches for available layers
++ only show layer switches for available layers
? only show tiles of current layer
- fix the coordinates in the "help area"
- signatures, station names (on all layers), effects (on the desired layer)
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp
index b0a00a383..a9d865d81 100644
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -1028,7 +1028,7 @@ static CallBackFunction MenuClickUnderground(int index)
static CallBackFunction ToolbarUndergroundClick(Window *w)
{
- PopupMainToolbMenu(w, WID_TN_UNDERGROUND, STR_LANDSCAPING_MENU_UNDERGROUND, 5);
+ PopupMainToolbMenu(w, WID_TN_UNDERGROUND, STR_LANDSCAPING_MENU_UNDERGROUND, 1+LayerCount());
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
return CBF_NONE;
}