Codechange: Use GetWidgetString for network windows. (#13699)

This commit is contained in:
Peter Nelson
2025-03-02 18:51:54 +00:00
committed by GitHub
parent 2f75f3d147
commit e9609e4558
3 changed files with 31 additions and 33 deletions

View File

@@ -66,12 +66,13 @@ struct ContentTextfileWindow : public TextfileWindow {
}
}
void SetStringParameters(WidgetID widget) const override
std::string GetWidgetString(WidgetID widget, StringID stringid) const override
{
if (widget == WID_TF_CAPTION) {
SetDParam(0, this->GetTypeString());
SetDParamStr(1, this->ci->name);
return GetString(stringid, this->GetTypeString(), this->ci->name);
}
return this->Window::GetWidgetString(widget, stringid);
}
};