Example: Set mouse cursor in text input box

This commit is contained in:
Chance Snow 2020-10-07 15:02:40 -05:00
parent 4ece005269
commit a48dccc652

View File

@ -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;