From a48dccc652ae656a2103c3844fb356b0c73a77b8 Mon Sep 17 00:00:00 2001 From: Chance Snow Date: Wed, 7 Oct 2020 15:02:40 -0500 Subject: [PATCH] Example: Set mouse cursor in text input box --- examples/text/text_input_box.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/text/text_input_box.c b/examples/text/text_input_box.c index 981ae80de..b22ff2e13 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;