summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui.h2
-rw-r--r--src/misc_gui.cpp12
-rw-r--r--src/toolbar_gui.cpp15
3 files changed, 17 insertions, 12 deletions
diff --git a/src/gui.h b/src/gui.h
index 4385af452..68ae76d0c 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -46,7 +46,7 @@ void ShowGenerateLandscape();
void ShowHeightmapLoad();
/* misc_gui.cpp */
-void PlaceLandBlockInfo();
+void ShowLandInfo(TileIndex tile);
void ShowAboutWindow();
void ShowBuildTreesToolbar();
void ShowTownDirectory();
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 9e472b1cf..406776376 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -329,22 +329,12 @@ public:
}
};
-static void Place_LandInfo(TileIndex tile)
+void ShowLandInfo(TileIndex tile)
{
DeleteWindowById(WC_LAND_INFO, 0);
new LandInfoWindow(tile);
}
-void PlaceLandBlockInfo()
-{
- if (_cursor.sprite == SPR_CURSOR_QUERY) {
- ResetObjectToPlace();
- } else {
- _place_proc = Place_LandInfo;
- SetObjectToPlace(SPR_CURSOR_QUERY, PAL_NONE, HT_RECT, WC_MAIN_TOOLBAR, 0);
- }
-}
-
/** Widgets for the land info window. */
enum AboutWidgets {
AW_SCROLLING_TEXT, ///< The actually scrolling text
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp
index 9841d3b66..7a0d9b2fc 100644
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -755,6 +755,21 @@ static void MenuClickNewspaper(int index)
/* --- Help button menu --- */
+static void Place_LandInfo(TileIndex tile)
+{
+ ShowLandInfo(tile);
+}
+
+static void PlaceLandBlockInfo()
+{
+ if (_cursor.sprite == SPR_CURSOR_QUERY) {
+ ResetObjectToPlace();
+ } else {
+ _place_proc = Place_LandInfo;
+ SetObjectToPlace(SPR_CURSOR_QUERY, PAL_NONE, HT_RECT, WC_MAIN_TOOLBAR, 0);
+ }
+}
+
static void ToolbarHelpClick(Window *w)
{
PopupMainToolbMenu(w, TBN_HELP, STR_ABOUT_MENU_LAND_BLOCK_INFO, _settings_client.gui.newgrf_developer_tools ? 9 : 8);