summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-04-24 13:22:17 +0000
committerrubidium <rubidium@openttd.org>2010-04-24 13:22:17 +0000
commitfef77ca53e2d3a381889aecc6739053f1582143b (patch)
tree21d5e4021bbbbc6599cd130e3837503c41b7a3c1 /src
parent3461430a34880d0db9ac2b5dc711e7dd876264f7 (diff)
downloadopenttd-fef77ca53e2d3a381889aecc6739053f1582143b.tar.xz
(svn r19705) -Change: reinitialise the windows when changing the newgrf_developer_tools setting
Diffstat (limited to 'src')
-rw-r--r--src/settings.cpp12
-rw-r--r--src/table/settings.h3
2 files changed, 14 insertions, 1 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index a50c240c0..ae3e13c78 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -680,6 +680,18 @@ static bool RedrawScreen(int32 p1)
}
/**
+ * Reinitalise all windows, i.e. construct their windows
+ * from the begin. For example to show a particular button
+ * that was previously hidden.
+ * @param p1 ignored
+ */
+static bool ReinitWindows(int32 p1)
+{
+ ReInitAllWindows();
+ return true;
+}
+
+/**
* Redraw the smallmap after a colour scheme change.
* @param p1 Callback parameter.
* @return Always true.
diff --git a/src/table/settings.h b/src/table/settings.h
index c4eba3ded..0990e4116 100644
--- a/src/table/settings.h
+++ b/src/table/settings.h
@@ -13,6 +13,7 @@
static bool v_PositionMainToolbar(int32 p1);
static bool PopulationInLabelActive(int32 p1);
static bool RedrawScreen(int32 p1);
+static bool ReinitWindows(int32 p1);
static bool RedrawSmallmap(int32 p1);
static bool InvalidateDetailsWindow(int32 p1);
static bool InvalidateStationBuildWindow(int32 p1);
@@ -605,7 +606,7 @@ const SettingDesc _settings[] = {
SDTC_BOOL(gui.show_date_in_logs, S, 0, false, STR_NULL, NULL),
#endif
SDTC_VAR(gui.developer, SLE_UINT8, S, 0, 1, 0, 2, 0, STR_NULL, NULL),
- SDTC_BOOL(gui.newgrf_developer_tools, S, 0, false, STR_NULL, NULL),
+ SDTC_BOOL(gui.newgrf_developer_tools, S, 0, false, STR_NULL, ReinitWindows),
SDTC_BOOL(gui.ai_developer_tools, S, 0, false, STR_NULL, NULL),
SDTC_VAR(gui.console_backlog_timeout, SLE_UINT16, S, 0, 100, 10, 65500, 0, STR_NULL, NULL),
SDTC_VAR(gui.console_backlog_length, SLE_UINT16, S, 0, 100, 10, 65500, 0, STR_NULL, NULL),