|
@@ -766,15 +766,11 @@ RAYGUIDEF bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool edi
|
|
|
else selStart = selStart - guiTextBoxState.start;
|
|
|
}
|
|
|
else state = GUI_STATE_FOCUSED;
|
|
|
+
|
|
|
+ if (IsKeyPressed(KEY_ENTER) || (!CheckCollisionPointRec(mousePoint, bounds) && IsMouseButtonPressed(0))) pressed = true;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (CheckCollisionPointRec(mousePoint, bounds))
|
|
|
- {
|
|
|
- state = GUI_STATE_FOCUSED;
|
|
|
- if (IsMouseButtonPressed(0)) pressed = true;
|
|
|
- }
|
|
|
-
|
|
|
if (active && IsKeyDown(KEY_LEFT_CONTROL) && IsKeyPressed(KEY_C))
|
|
|
{
|
|
|
// If active copy all text to clipboard even when disabled
|
|
@@ -797,7 +793,16 @@ RAYGUIDEF bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool edi
|
|
|
guiTextBoxState.cursor = cursor;
|
|
|
guiTextBoxState.start = start;
|
|
|
}
|
|
|
+
|
|
|
+ if (CheckCollisionPointRec(mousePoint, bounds))
|
|
|
+ {
|
|
|
+ state = GUI_STATE_FOCUSED;
|
|
|
+ if (IsMouseButtonPressed(0)) pressed = true;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
+ if (pressed) framesCounter = 0;
|
|
|
}
|
|
|
|
|
|
// Draw control
|