MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ShowQueryString

Function ShowQueryString

src/misc_gui.cpp:1064–1070  ·  view source on GitHub ↗

* Show a query popup window with a textbox in it. * @param str StringID for the text shown in the textbox * @param caption StringID of text shown in caption of querywindow * @param maxsize maximum size in bytes or characters (including terminating '\0') depending on flags * @param parent pointer to a Window that will handle the events (ok/cancel) of this window. * @param afilter filters out u

Source from the content-addressed store, hash-verified

1062 * @param flags various flags, @see QueryStringFlags
1063 */
1064void ShowQueryString(std::string_view str, StringID caption, uint maxsize, Window *parent, CharSetFilter afilter, QueryStringFlags flags)
1065{
1066 assert(parent != nullptr);
1067
1068 CloseWindowByClass(WC_QUERY_STRING);
1069 new QueryStringWindow(str, caption, (flags.Test(QueryStringFlag::LengthIsInChars) ? MAX_CHAR_LENGTH : 1) * maxsize, maxsize, _query_string_desc, parent, afilter, flags);
1070}
1071
1072/**
1073 * Window used for asking the user a YES/NO question.

Callers 15

OnClickMethod · 0.85
ToolbarScenDatePanelFunction · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85
CheatPanelClickMethod · 0.85
SettingsPanelClickMethod · 0.85
OnClickMethod · 0.85
ShowRenameGroupWindowMethod · 0.85

Calls 2

CloseWindowByClassFunction · 0.85
TestMethod · 0.80

Tested by

no test coverage detected