(svn r21716) -Add: Tooltip for the industry legend at the smallmap.

pull/155/head
terkhen 14 years ago
parent dcb71c3770
commit 929aaa7e08

@ -664,6 +664,7 @@ STR_SMALLMAP_TOOLTIP_SHOW_INDUSTRIES_ON_MAP :{BLACK}Show ind
STR_SMALLMAP_TOOLTIP_SHOW_TRANSPORT_ROUTES_ON :{BLACK}Show transport routes on map
STR_SMALLMAP_TOOLTIP_SHOW_VEGETATION_ON_MAP :{BLACK}Show vegetation on map
STR_SMALLMAP_TOOLTIP_SHOW_LAND_OWNERS_ON_MAP :{BLACK}Show land owners on map
STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION :{BLACK}Click on an industry type to toggle displaying it. Ctrl+Click disables all types except the selected one. Ctrl+Click on it again to enable all industry types
STR_SMALLMAP_LEGENDA_ROADS :{TINYFONT}{BLACK}Roads
STR_SMALLMAP_LEGENDA_RAILROADS :{TINYFONT}{BLACK}Railways

@ -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();
}

Loading…
Cancel
Save