Codechange: Use parameterised GetString() in network-related windows. (#13635)

This commit is contained in:
2025-02-22 13:16:47 +00:00
committed by GitHub
parent 847fbe3348
commit 2b80812922
6 changed files with 82 additions and 118 deletions

View File

@@ -2419,8 +2419,7 @@ struct GameSettingsWindow : Window {
if (this->warn_missing == WHR_NONE) {
new_warn_lines = 0;
} else {
SetDParam(0, _game_settings_restrict_dropdown[this->filter.min_cat]);
new_warn_lines = GetStringLineCount(warn_str, panel.Width());
new_warn_lines = GetStringLineCount(GetString(warn_str, _game_settings_restrict_dropdown[this->filter.min_cat]), panel.Width());
}
if (this->warn_lines != new_warn_lines) {
this->vscroll->SetCount(this->vscroll->GetCount() - this->warn_lines + new_warn_lines);