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

Method hasTextInputFocus

src/openrct2-ui/input/InputManager.cpp:573–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571}
572
573bool InputManager::hasTextInputFocus() const
574{
575 if (Windows::IsUsingWidgetTextBox() || gChatOpen)
576 return true;
577
578 auto* windowMgr = GetWindowManager();
579 auto w = windowMgr->FindByClass(WindowClass::textinput);
580 if (w != nullptr)
581 return true;
582
583 auto& console = GetInGameConsole();
584 if (console.IsOpen())
585 return true;
586
587 return false;
588}

Callers

nothing calls this directly

Calls 4

IsUsingWidgetTextBoxFunction · 0.85
GetWindowManagerFunction · 0.85
IsOpenMethod · 0.80
FindByClassMethod · 0.45

Tested by

no test coverage detected