Fix: Company query popups do not update in multiplayer.

This commit is contained in:
Rito12
2026-01-01 16:53:26 +01:00
committed by rubidium42
parent 0ec507d4c5
commit f57c2cc56e
4 changed files with 32 additions and 8 deletions
+10
View File
@@ -1069,6 +1069,16 @@ void ShowQueryString(std::string_view str, StringID caption, uint maxsize, Windo
new QueryStringWindow(str, caption, (flags.Test(QueryStringFlag::LengthIsInChars) ? MAX_CHAR_LENGTH : 1) * maxsize, maxsize, _query_string_desc, parent, afilter, flags);
}
/**
* Updates default text value of query strign window.
* @param str String for the default text shown in the textbox.
*/
void UpdateQueryStringDefault(std::string_view str)
{
QueryStringWindow *w = dynamic_cast<QueryStringWindow *>(FindWindowByClass(WC_QUERY_STRING));
if (w != nullptr) w->editbox.orig = str;
}
/**
* Window used for asking the user a YES/NO question.
*/