1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 01:42:38 +01:00

Codechange: prepare for replacement of SetStringParameter by GetWidgetString

This commit is contained in:
Rubidium
2025-03-01 22:06:29 +01:00
committed by rubidium42
parent 321debf7b1
commit d94d421772
4 changed files with 69 additions and 51 deletions

View File

@@ -499,6 +499,13 @@ bool Window::SetFocusedWidget(WidgetID widget_index)
return true;
}
std::string Window::GetWidgetString([[maybe_unused]] WidgetID widget, StringID stringid) const
{
if (stringid == STR_NULL) return {};
this->SetStringParameters(widget);
return GetString(stringid);
}
/**
* Called when window gains focus
*/