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

Function WindowCancelTextbox

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

Source from the content-addressed store, hash-verified

575 }
576
577 void WindowCancelTextbox()
578 {
579 if (_usingWidgetTextBox)
580 {
581 auto* windowMgr = GetWindowManager();
582 WindowBase* w = windowMgr->FindByNumber(_currentTextBox.window.classification, _currentTextBox.window.number);
583 _currentTextBox.window.classification = WindowClass::null;
584 _currentTextBox.window.number = 0;
585 ContextStopTextInput();
586 _usingWidgetTextBox = false;
587 if (w != nullptr)
588 {
589 windowMgr->InvalidateWidget(*w, _currentTextBox.widgetIndex);
590 }
591 _currentTextBox.widgetIndex = kWidgetIndexNull;
592 }
593 }
594
595 void WindowUpdateTextboxCaret()
596 {

Callers 4

HandleMessageMethod · 0.85
WindowStartTextboxFunction · 0.85
ShortcutToggleConsoleFunction · 0.85
InputWidgetLeftFunction · 0.85

Calls 4

GetWindowManagerFunction · 0.85
ContextStopTextInputFunction · 0.85
InvalidateWidgetMethod · 0.80
FindByNumberMethod · 0.45

Tested by

no test coverage detected