Codechange: use SetToolTip instead of accessing tool_tip directly

This commit is contained in:
Rubidium
2025-01-02 12:02:15 +01:00
committed by rubidium42
parent 3dd0b93698
commit f0a74fcabb
8 changed files with 32 additions and 32 deletions

View File

@@ -1095,7 +1095,7 @@ struct BuildRoadDepotWindow : public PickerWindowBase {
if (RoadTypeIsTram(_cur_roadtype)) {
this->GetWidget<NWidgetCore>(WID_BROD_CAPTION)->widget_data = STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION;
for (WidgetID i = WID_BROD_DEPOT_NE; i <= WID_BROD_DEPOT_NW; i++) {
this->GetWidget<NWidgetCore>(i)->tool_tip = STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP;
this->GetWidget<NWidgetCore>(i)->SetToolTip(STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP);
}
}
@@ -1317,7 +1317,7 @@ public:
this->GetWidget<NWidgetCore>(WID_BROS_CAPTION)->widget_data = rti->strings.picker_title[rs];
for (WidgetID i = RoadTypeIsTram(_cur_roadtype) ? WID_BROS_STATION_X : WID_BROS_STATION_NE; i < WID_BROS_LT_OFF; i++) {
this->GetWidget<NWidgetCore>(i)->tool_tip = rti->strings.picker_tooltip[rs];
this->GetWidget<NWidgetCore>(i)->SetToolTip(rti->strings.picker_tooltip[rs]);
}
this->LowerWidget(WID_BROS_STATION_NE + _roadstop_gui.orientation);