From 9833fe45eb5cd6cfd3593b7f4d1aae9cf7367729 Mon Sep 17 00:00:00 2001 From: Chance Snow Date: Wed, 21 Oct 2020 03:55:52 -0500 Subject: 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 --- examples/text/text_input_box.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'examples/text/text_input_box.c') 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; -- cgit v1.2.3