Example: Set mouse cursor in text input box
This commit is contained in:
parent
4ece005269
commit
a48dccc652
|
|
@ -43,6 +43,9 @@ int main(void)
|
||||||
|
|
||||||
if (mouseOnText)
|
if (mouseOnText)
|
||||||
{
|
{
|
||||||
|
// Set the window's cursor to the I-Beam
|
||||||
|
SetMouseCursor(MOUSE_CURSOR_IBEAM);
|
||||||
|
|
||||||
// Get pressed key (character) on the queue
|
// Get pressed key (character) on the queue
|
||||||
int key = GetKeyPressed();
|
int key = GetKeyPressed();
|
||||||
|
|
||||||
|
|
@ -67,6 +70,10 @@ int main(void)
|
||||||
if (letterCount < 0) letterCount = 0;
|
if (letterCount < 0) letterCount = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (GetMouseCursor() != MOUSE_CURSOR_DEFAULT)
|
||||||
|
{
|
||||||
|
SetMouseCursor(MOUSE_CURSOR_DEFAULT);
|
||||||
|
}
|
||||||
|
|
||||||
if (mouseOnText) framesCounter++;
|
if (mouseOnText) framesCounter++;
|
||||||
else framesCounter = 0;
|
else framesCounter = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user