From 0f832e6a6edfa77a93c327617468b15755cb05ce Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 18 Jun 2024 23:24:11 +0200 Subject: [PATCH] Update raygui.h --- src/raygui.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index f07ae9e..1c7fddc 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -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); @@ -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) {