mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-25 21:24:12 +01:00
Codechange: add and use SetString over directly accessing widget_data
This commit is contained in:
@@ -308,7 +308,7 @@ public:
|
||||
|
||||
/* When downloading is finished change cancel in ok */
|
||||
if (this->downloaded_bytes == this->total_bytes) {
|
||||
this->GetWidget<NWidgetCore>(WID_NCDS_CANCELOK)->widget_data = STR_BUTTON_OK;
|
||||
this->GetWidget<NWidgetCore>(WID_NCDS_CANCELOK)->SetString(STR_BUTTON_OK);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1003,7 +1003,7 @@ public:
|
||||
this->SetWidgetDisabledState(WID_NCL_TEXTFILE + tft, this->selected == nullptr || this->selected->state != ContentInfo::ALREADY_HERE || !this->selected->GetTextfile(tft).has_value());
|
||||
}
|
||||
|
||||
this->GetWidget<NWidgetCore>(WID_NCL_CANCEL)->widget_data = this->filesize_sum == 0 ? STR_AI_SETTINGS_CLOSE : STR_AI_LIST_CANCEL;
|
||||
this->GetWidget<NWidgetCore>(WID_NCL_CANCEL)->SetString(this->filesize_sum == 0 ? STR_AI_SETTINGS_CLOSE : STR_AI_LIST_CANCEL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user