summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorChance Snow <[email protected]>2020-10-21 03:55:52 -0500
committerGitHub <[email protected]>2020-10-21 10:55:52 +0200
commit9833fe45eb5cd6cfd3593b7f4d1aae9cf7367729 (patch)
treeb231ff0cb2fc2c9ba43858f6ac7f272aa1efe077 /examples
parenteb3e9e4df53c0908a4ae3dd91cbe0e3a42134794 (diff)
downloadraylib-9833fe45eb5cd6cfd3593b7f4d1aae9cf7367729.tar.gz
raylib-9833fe45eb5cd6cfd3593b7f4d1aae9cf7367729.zip
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
Diffstat (limited to 'examples')
-rw-r--r--examples/text/text_input_box.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/text/text_input_box.c b/examples/text/text_input_box.c
index 650ca207..b68f762c 100644
--- a/examples/text/text_input_box.c
+++ b/examples/text/text_input_box.c
@@ -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;