Codechange: add and use SetString over directly accessing widget_data

This commit is contained in:
Rubidium
2025-01-02 12:46:21 +01:00
committed by rubidium42
parent fb06ddafba
commit b60101853c
16 changed files with 74 additions and 42 deletions

View File

@@ -373,7 +373,7 @@ public:
this->CreateNestedTree();
this->town = Town::Get(window_number);
if (this->town->larger_town) this->GetWidget<NWidgetCore>(WID_TV_CAPTION)->widget_data = STR_TOWN_VIEW_CITY_CAPTION;
if (this->town->larger_town) this->GetWidget<NWidgetCore>(WID_TV_CAPTION)->SetString(STR_TOWN_VIEW_CITY_CAPTION);
this->FinishInitNested(window_number);