summaryrefslogtreecommitdiff
path: root/src/toolbar_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-12-21 21:46:19 +0000
committeralberth <alberth@openttd.org>2010-12-21 21:46:19 +0000
commit35a8e91d01102262efa8eb9df809c6411a1fd7d6 (patch)
tree62069748cdd7a9acc145b80655c18fbd0bf60855 /src/toolbar_gui.cpp
parent05e7e084300d36fe8af80aa9e157de42b6c8bbc7 (diff)
downloadopenttd-35a8e91d01102262efa8eb9df809c6411a1fd7d6.tar.xz
(svn r21589) -Codechange: Move PlaceLandBlockInfo() to the right file, introduce a ShowLandInfo() function.
Diffstat (limited to 'src/toolbar_gui.cpp')
-rw-r--r--src/toolbar_gui.cpp15
1 files changed, 15 insertions, 0 deletions
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);