mirror of
https://github.com/raysan5/raygui.git
synced 2026-02-02 04:09:18 -05:00
Added note
This commit is contained in:
@ -1574,7 +1574,6 @@ RAYGUIDEF bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editM
|
|||||||
if (editMode)
|
if (editMode)
|
||||||
{
|
{
|
||||||
state = GUI_STATE_PRESSED;
|
state = GUI_STATE_PRESSED;
|
||||||
|
|
||||||
framesCounter++;
|
framesCounter++;
|
||||||
|
|
||||||
int key = GetKeyPressed();
|
int key = GetKeyPressed();
|
||||||
@ -1639,6 +1638,9 @@ RAYGUIDEF bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editM
|
|||||||
if (state == GUI_STATE_PRESSED)
|
if (state == GUI_STATE_PRESSED)
|
||||||
{
|
{
|
||||||
DrawRectangle(bounds.x + GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.y + GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.width - 2*GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.height - 2*GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_FOCUSED)), guiAlpha));
|
DrawRectangle(bounds.x + GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.y + GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.width - 2*GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.height - 2*GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_FOCUSED)), guiAlpha));
|
||||||
|
|
||||||
|
// Draw blinking cursor
|
||||||
|
// TODO: Consider TEXTBOX TEXT_ALIGNMENT
|
||||||
if (editMode && ((framesCounter/20)%2 == 0)) DrawRectangle(bounds.x + GuiGetStyle(TEXTBOX, INNER_PADDING) + GetTextWidth(text) + 2, bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE), 1, GuiGetStyle(DEFAULT, TEXT_SIZE)*2, Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER_COLOR_PRESSED)), guiAlpha));
|
if (editMode && ((framesCounter/20)%2 == 0)) DrawRectangle(bounds.x + GuiGetStyle(TEXTBOX, INNER_PADDING) + GetTextWidth(text) + 2, bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE), 1, GuiGetStyle(DEFAULT, TEXT_SIZE)*2, Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER_COLOR_PRESSED)), guiAlpha));
|
||||||
}
|
}
|
||||||
else if (state == GUI_STATE_DISABLED)
|
else if (state == GUI_STATE_DISABLED)
|
||||||
|
|||||||
Reference in New Issue
Block a user