account for escape key on web
This commit is contained in:
parent
9322ad0f9b
commit
0e4b1758cc
|
|
@ -674,8 +674,6 @@ void EnableCursor(void)
|
|||
|
||||
// Set cursor position in the middle
|
||||
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);
|
||||
|
||||
CORE.Input.Mouse.cursorHidden = false;
|
||||
}
|
||||
|
||||
// Disables cursor (lock cursor)
|
||||
|
|
@ -686,8 +684,10 @@ void DisableCursor(void)
|
|||
|
||||
// Set cursor position in the middle
|
||||
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);
|
||||
}
|
||||
|
||||
CORE.Input.Mouse.cursorHidden = true;
|
||||
bool IsCursorHidden(void) {
|
||||
return EM_ASM_INT({ return document.pointerLockElement !== null; }) ? true : false;
|
||||
}
|
||||
|
||||
// Swap back buffer with front buffer (screen drawing)
|
||||
|
|
|
|||
|
|
@ -790,10 +790,12 @@ void DisableEventWaiting(void)
|
|||
}
|
||||
|
||||
// Check if cursor is not visible
|
||||
#if !defined(PLATFORM_WEB)
|
||||
bool IsCursorHidden(void)
|
||||
{
|
||||
return CORE.Input.Mouse.cursorHidden;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check if cursor is on the current screen.
|
||||
bool IsCursorOnScreen(void)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user