mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
This commit is contained in:
parent
0f1d338dda
commit
7ba0fa4bf0
@ -125,7 +125,10 @@ struct BuildDocksToolbarWindow : Window {
|
||||
if (!can_build) {
|
||||
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
|
||||
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
|
||||
}
|
||||
|
||||
if (_game_mode != GM_EDITOR) {
|
||||
if (!can_build) {
|
||||
/* Show in the tooltip why this button is disabled. */
|
||||
this->GetWidget<NWidgetCore>(WID_DT_DEPOT)->SetToolTip(STR_TOOLBAR_DISABLED_NO_VEHICLE_AVAILABLE);
|
||||
this->GetWidget<NWidgetCore>(WID_DT_STATION)->SetToolTip(STR_TOOLBAR_DISABLED_NO_VEHICLE_AVAILABLE);
|
||||
@ -136,6 +139,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||
this->GetWidget<NWidgetCore>(WID_DT_BUOY)->SetToolTip(STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
{
|
||||
|
@ -315,7 +315,10 @@ struct BuildRoadToolbarWindow : Window {
|
||||
DeleteWindowById(WC_BUS_STATION, TRANSPORT_ROAD);
|
||||
DeleteWindowById(WC_TRUCK_STATION, TRANSPORT_ROAD);
|
||||
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_ROAD);
|
||||
}
|
||||
|
||||
if (_game_mode != GM_EDITOR) {
|
||||
if (!can_build) {
|
||||
/* Show in the tooltip why this button is disabled. */
|
||||
this->GetWidget<NWidgetCore>(WID_ROT_DEPOT)->SetToolTip(STR_TOOLBAR_DISABLED_NO_VEHICLE_AVAILABLE);
|
||||
this->GetWidget<NWidgetCore>(WID_ROT_BUS_STATION)->SetToolTip(STR_TOOLBAR_DISABLED_NO_VEHICLE_AVAILABLE);
|
||||
@ -326,6 +329,7 @@ struct BuildRoadToolbarWindow : Window {
|
||||
this->GetWidget<NWidgetCore>(WID_ROT_TRUCK_STATION)->SetToolTip(rtt == RTT_ROAD ? STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY : STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Initialize(RoadType roadtype)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user