summaryrefslogtreecommitdiff
path: root/src/smallmap_gui.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2011-01-04 20:54:36 +0000
committerterkhen <terkhen@openttd.org>2011-01-04 20:54:36 +0000
commitebb360f48c5d1d587bb1a20461c51c6048e48eca (patch)
tree79e6de09cfa3ad3dd8e43011ec6c7e84730407c4 /src/smallmap_gui.cpp
parent5268d03abd7f84b842457c939a9de205145da119 (diff)
downloadopenttd-ebb360f48c5d1d587bb1a20461c51c6048e48eca.tar.xz
(svn r21716) -Add: Tooltip for the industry legend at the smallmap.
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r--src/smallmap_gui.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index 9ff94124f..64517ff39 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -992,6 +992,8 @@ public:
this->SetWidgetLoweredState(SM_WIDGET_TOGGLETOWNNAME, this->show_towns);
this->GetWidget<NWidgetStacked>(SM_WIDGET_SELECTINDUSTRIES)->SetDisplayedPlane(this->map_type != SMT_INDUSTRY);
+ this->GetWidget<NWidgetCore>(SM_WIDGET_LEGEND)->SetDataTip(STR_NULL,
+ (this->map_type == SMT_INDUSTRY) ? STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION : STR_NULL);
this->SetZoomLevel(ZLC_INITIALIZE, NULL);
this->SmallMapCenterOnCurrentPos();
@@ -1153,6 +1155,9 @@ public:
/* Hide Enable all/Disable all buttons if is not industry type small map */
this->GetWidget<NWidgetStacked>(SM_WIDGET_SELECTINDUSTRIES)->SetDisplayedPlane(this->map_type != SMT_INDUSTRY);
+ this->GetWidget<NWidgetCore>(SM_WIDGET_LEGEND)->SetDataTip(STR_NULL,
+ (this->map_type == SMT_INDUSTRY) ? STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION : STR_NULL);
+
this->SetDirty();
}