MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / WindowTextInputOpen

Function WindowTextInputOpen

src/openrct2-ui/windows/TextInput.cpp:393–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391 }
392
393 void WindowTextInputOpen(
394 std::string_view title, std::string_view description, std::string_view initialValue, size_t maxLength,
395 std::function<void(std::string_view)> callback, std::function<void()> cancelCallback)
396 {
397 auto* windowMgr = GetWindowManager();
398 auto w = windowMgr->Create<TextInputWindow>(
399 WindowClass::textinput, { kWindowSize.width, kWindowSize.height + 10 },
400 { WindowFlag::centreScreen, WindowFlag::stickToFront });
401 if (w != nullptr)
402 {
403 w->setTitle(title, description);
404 w->setText(initialValue, maxLength);
405 w->setCallback(callback, cancelCallback);
406 }
407 }
408
409 void WindowTextInputOpen(
410 WindowBase* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs,

Callers 15

textInputOpenMethod · 0.85
InputSizeMethod · 0.85
onMouseUpObjectiveMethod · 0.85
InputSizeMethod · 0.85
InputSizeMethod · 0.85
onMouseUpMethod · 0.85
InputSizeMethod · 0.85
InputSizeMethod · 0.85
InputMapSizeMethod · 0.85
ForestsMouseUpMethod · 0.85
SimplexMouseUpMethod · 0.85
HeightmapMouseUpMethod · 0.85

Calls 6

GetWindowManagerFunction · 0.85
FormatStringIDLegacyFunction · 0.85
WindowTextInputRawOpenFunction · 0.85
setTitleMethod · 0.80
setTextMethod · 0.80
setCallbackMethod · 0.80

Tested by

no test coverage detected