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

Method Update

Source/Engine/Engine/Screen.cpp:234–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void ScreenService::Update()
235{
236#if USE_EDITOR
237 // Sync current cursor state in Editor (eg. when viewport focus can change)
238 const auto win = Editor::Managed->GetGameWindow(true);
239 bool gameViewportFocus = win && Engine::HasGameViewportFocus();
240 if (gameViewportFocus != LastGameViewportFocus)
241 Screen::SetCursorVisible(CursorVisible);
242 LastGameViewportFocus = gameViewportFocus;
243#endif
244
245 // Sync pending cursor lock mode
246 if (PendingCursorLock != CursorLockMode::None && Engine::HasGameViewportFocus())
247 Screen::SetCursorLock(PendingCursorLock);
248}
249
250void ScreenService::Draw()
251{

Callers

nothing calls this directly

Calls 1

GetGameWindowMethod · 0.80

Tested by

no test coverage detected