mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 18:40:29 +00:00
parent
6e21190858
commit
d242875d27
@ -1490,6 +1490,8 @@ void VehicleEnterDepot(Vehicle *v)
|
|||||||
TriggerVehicle(v, VEHICLE_TRIGGER_DEPOT);
|
TriggerVehicle(v, VEHICLE_TRIGGER_DEPOT);
|
||||||
v->MarkDirty();
|
v->MarkDirty();
|
||||||
|
|
||||||
|
InvalidateWindowData(WC_VEHICLE_VIEW, v->index);
|
||||||
|
|
||||||
if (v->current_order.IsType(OT_GOTO_DEPOT)) {
|
if (v->current_order.IsType(OT_GOTO_DEPOT)) {
|
||||||
SetWindowDirty(WC_VEHICLE_VIEW, v->index);
|
SetWindowDirty(WC_VEHICLE_VIEW, v->index);
|
||||||
|
|
||||||
|
@ -585,6 +585,7 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
|||||||
SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
|
SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
|
||||||
SetWindowDirty(WC_VEHICLE_DEPOT, v->tile);
|
SetWindowDirty(WC_VEHICLE_DEPOT, v->tile);
|
||||||
SetWindowClassesDirty(GetWindowClassForVehicleType(v->type));
|
SetWindowClassesDirty(GetWindowClassForVehicleType(v->type));
|
||||||
|
InvalidateWindowData(WC_VEHICLE_VIEW, v->index);
|
||||||
}
|
}
|
||||||
return CommandCost();
|
return CommandCost();
|
||||||
}
|
}
|
||||||
|
@ -2503,6 +2503,8 @@ public:
|
|||||||
this->GetWidget<NWidgetCore>(WID_VV_SHOW_ORDERS)->tool_tip = STR_VEHICLE_VIEW_TRAIN_ORDERS_TOOLTIP + v->type;
|
this->GetWidget<NWidgetCore>(WID_VV_SHOW_ORDERS)->tool_tip = STR_VEHICLE_VIEW_TRAIN_ORDERS_TOOLTIP + v->type;
|
||||||
this->GetWidget<NWidgetCore>(WID_VV_SHOW_DETAILS)->tool_tip = STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP + v->type;
|
this->GetWidget<NWidgetCore>(WID_VV_SHOW_DETAILS)->tool_tip = STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP + v->type;
|
||||||
this->GetWidget<NWidgetCore>(WID_VV_CLONE)->tool_tip = STR_VEHICLE_VIEW_CLONE_TRAIN_INFO + v->type;
|
this->GetWidget<NWidgetCore>(WID_VV_CLONE)->tool_tip = STR_VEHICLE_VIEW_CLONE_TRAIN_INFO + v->type;
|
||||||
|
|
||||||
|
this->UpdateButtonStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
~VehicleViewWindow()
|
~VehicleViewWindow()
|
||||||
@ -2732,7 +2734,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnGameTick()
|
void UpdateButtonStatus()
|
||||||
{
|
{
|
||||||
const Vehicle *v = Vehicle::Get(this->window_number);
|
const Vehicle *v = Vehicle::Get(this->window_number);
|
||||||
bool veh_stopped = v->IsStoppedInDepot();
|
bool veh_stopped = v->IsStoppedInDepot();
|
||||||
@ -2769,6 +2771,8 @@ public:
|
|||||||
* Nothing to do for this window. */
|
* Nothing to do for this window. */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->UpdateButtonStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool IsNewGRFInspectable() const
|
virtual bool IsNewGRFInspectable() const
|
||||||
|
Loading…
Reference in New Issue
Block a user