Update raygui.h

This commit is contained in:
Ray 2024-06-18 23:24:11 +02:00
parent 4b3d94f5df
commit 0f832e6a6e

View File

@ -4943,7 +4943,7 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C
float glyphWidth = 0; float glyphWidth = 0;
int ellipsisWidth = GetTextWidth("..."); int ellipsisWidth = GetTextWidth("...");
bool overflowReached = false; bool textOverflow = false;
for (int c = 0, codepointSize = 0; c < lineSize; c += codepointSize) for (int c = 0, codepointSize = 0; c < lineSize; c += codepointSize)
{ {
int codepoint = GetCodepointNext(&lines[i][c], &codepointSize); int codepoint = GetCodepointNext(&lines[i][c], &codepointSize);
@ -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)); 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) for (int j = 0; j < ellipsisWidth; j += ellipsisWidth/3)
{ {