Codechange: use SetStringTip instead of accessing widget_data and tool_tip directly
This commit is contained in:
@@ -949,8 +949,7 @@ struct RefitWindow : public Window {
|
||||
this->GetWidget<NWidgetCore>(WID_VR_SELECT_HEADER)->tool_tip = STR_REFIT_TRAIN_LIST_TOOLTIP + v->type;
|
||||
this->GetWidget<NWidgetCore>(WID_VR_MATRIX)->tool_tip = STR_REFIT_TRAIN_LIST_TOOLTIP + v->type;
|
||||
NWidgetCore *nwi = this->GetWidget<NWidgetCore>(WID_VR_REFIT);
|
||||
nwi->widget_data = STR_REFIT_TRAIN_REFIT_BUTTON + v->type;
|
||||
nwi->tool_tip = STR_REFIT_TRAIN_REFIT_TOOLTIP + v->type;
|
||||
nwi->SetStringTip(STR_REFIT_TRAIN_REFIT_BUTTON + v->type, STR_REFIT_TRAIN_REFIT_TOOLTIP + v->type);
|
||||
this->GetWidget<NWidgetStacked>(WID_VR_SHOW_HSCROLLBAR)->SetDisplayedPlane(v->IsGroundVehicle() ? 0 : SZSP_HORIZONTAL);
|
||||
this->GetWidget<NWidgetCore>(WID_VR_VEHICLE_PANEL_DISPLAY)->tool_tip = (v->type == VEH_TRAIN) ? STR_REFIT_SELECT_VEHICLES_TOOLTIP : STR_NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user