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:
parent
eb3e9e4df5
commit
9833fe45eb
4 changed files with 84 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue