Added desktop cursor getter and setter functions (#1407)

* [core] Added desktop cursor getter and setter functions

* Example: Set mouse cursor in text input box

* Setup standard cursors _after_ GLFW window initialization

* Remove old `int GetMouseWheelMove` declaration
This commit is contained in:
Chance Snow 2020-10-21 03:55:52 -05:00 committed by GitHub
parent eb3e9e4df5
commit 9833fe45eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 1 deletions

View file

@ -43,6 +43,9 @@ int main(void)
if (mouseOnText)
{
// Set the window's cursor to the I-Beam
SetMouseCursor(MOUSE_CURSOR_IBEAM);
// Get pressed key (character) on the queue
int key = GetKeyPressed();
@ -67,6 +70,10 @@ int main(void)
if (letterCount < 0) letterCount = 0;
}
}
else if (GetMouseCursor() != MOUSE_CURSOR_DEFAULT)
{
SetMouseCursor(MOUSE_CURSOR_DEFAULT);
}
if (mouseOnText) framesCounter++;
else framesCounter = 0;