mirror of
https://github.com/raysan5/raygui.git
synced 2025-12-25 10:22:33 -05:00
Right clicking outside the textbox bounds will deactivate it
This commit is contained in:
@ -2041,6 +2041,12 @@ RAYGUIDEF bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editM
|
||||
GuiTextBoxSetActive(bounds);
|
||||
}
|
||||
}
|
||||
else if(!CheckCollisionPointRec(mousePoint, bounds) && IsMouseButtonPressed(MOUSE_RIGHT_BUTTON))
|
||||
{
|
||||
// When active and the right mouse is clicked outside the textbox we should deactivate it
|
||||
GuiTextBoxSetActive((Rectangle){0,0,-1,-1}); // Set a dummy rect as the active textbox bounds
|
||||
active = false;
|
||||
}
|
||||
|
||||
if(active)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user