mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-12 01:22:46 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user