mirror of
https://github.com/raysan5/raygui.git
synced 2026-01-22 07:09:19 -05:00
REVIEW: GuiTextBox(), avoid cursor out of box
This commit is contained in:
@ -1974,6 +1974,7 @@ bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (cursor.height > bounds.height) cursor.height = bounds.height - GuiGetStyle(TEXTBOX, BORDER_WIDTH)*2;
|
if (cursor.height > bounds.height) cursor.height = bounds.height - GuiGetStyle(TEXTBOX, BORDER_WIDTH)*2;
|
||||||
|
if (cursor.y < (bounds.y + GuiGetStyle(TEXTBOX, BORDER_WIDTH))) cursor.y = bounds.y + GuiGetStyle(TEXTBOX, BORDER_WIDTH);
|
||||||
|
|
||||||
// Update control
|
// Update control
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user