MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / SetCursorVisible

Method SetCursorVisible

Source/Engine/Engine/Screen.cpp:103–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void Screen::SetCursorVisible(const bool value)
104{
105#if USE_EDITOR
106 const auto win = Editor::Managed->GetGameWindow(true);
107#else
108 const auto win = Engine::MainWindow;
109#endif
110 if (win && Engine::HasGameViewportFocus())
111 win->SetCursor(value ? CursorType::Default : CursorType::Hidden);
112 else if (win)
113 win->SetCursor(CursorType::Default);
114 CursorVisible = value;
115}
116
117CursorLockMode Screen::GetCursorLock()
118{

Callers

nothing calls this directly

Calls 2

GetGameWindowMethod · 0.80
SetCursorMethod · 0.45

Tested by

no test coverage detected