Skip to content

Commit

Permalink
Update raygui.h
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Jun 18, 2024
1 parent 4b3d94f commit 0f832e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/raygui.h
Original file line number Diff line number Diff line change
Expand Up @@ -4943,7 +4943,7 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C
float glyphWidth = 0;

int ellipsisWidth = GetTextWidth("...");
bool overflowReached = false;
bool textOverflow = false;
for (int c = 0, codepointSize = 0; c < lineSize; c += codepointSize)
{
int codepoint = GetCodepointNext(&lines[i][c], &codepointSize);
Expand Down Expand Up @@ -5014,9 +5014,9 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C
{
DrawTextCodepoint(guiFont, codepoint, RAYGUI_CLITERAL(Vector2){ textBoundsPosition.x + textOffsetX, textBoundsPosition.y + textOffsetY }, (float)GuiGetStyle(DEFAULT, TEXT_SIZE), GuiFade(tint, guiAlpha));
}
else if (!overflowReached)
else if (!textOverflow)
{
overflowReached = true;
textOverflow = true;

for (int j = 0; j < ellipsisWidth; j += ellipsisWidth/3)
{
Expand Down

0 comments on commit 0f832e6

Please sign in to comment.