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

Function WindowStartTextbox

src/openrct2-ui/interface/Window.cpp:558–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556 }
557
558 void WindowStartTextbox(const WindowBase& callW, WidgetIndex callWidget, u8string existingText, int32_t maxLength)
559 {
560 if (_usingWidgetTextBox)
561 WindowCancelTextbox();
562
563 _usingWidgetTextBox = true;
564 _currentTextBox.window.classification = callW.classification;
565 _currentTextBox.window.number = callW.number;
566 _currentTextBox.widgetIndex = callWidget;
567 _textBoxFrameNo = 0;
568
569 auto* windowMgr = GetWindowManager();
570 windowMgr->CloseByClass(WindowClass::textinput);
571
572 _textBoxInput = existingText;
573
574 _textInput = ContextStartTextInput(_textBoxInput, maxLength);
575 }
576
577 void WindowCancelTextbox()
578 {

Callers 11

onMouseUpMethod · 0.85
onMouseUpMethod · 0.85
onMouseUpMethod · 0.85
onMouseUpMethod · 0.85
onMouseUpMethod · 0.85
onMouseUpMethod · 0.85
onOpenMethod · 0.85
onMouseUpMethod · 0.85
onMouseUpMethod · 0.85
onMouseDownMethod · 0.85
focusMethod · 0.85

Calls 4

WindowCancelTextboxFunction · 0.85
GetWindowManagerFunction · 0.85
ContextStartTextInputFunction · 0.85
CloseByClassMethod · 0.80

Tested by

no test coverage detected