From bb17983e22bf2afa9dcf3464e22f5af2d2934140 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 18 Apr 2023 00:28:57 +0200 Subject: [PATCH] Update raygui.h --- src/raygui.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index 95e90a4..8c869c8 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -3984,7 +3984,7 @@ static Rectangle GetTextBounds(int control, Rectangle bounds) switch (control) { case COMBOBOX: textBounds.width -= (GuiGetStyle(control, COMBO_BUTTON_WIDTH) + GuiGetStyle(control, COMBO_BUTTON_SPACING)); break; - case TEXTBOX: break; // TODO: Consider multi-line text? + //case TEXTBOX: break; // TODO: Consider multi-line text? //case VALUEBOX: break; // NOTE: ValueBox text value always centered, text padding applies to label default: { @@ -4170,7 +4170,7 @@ static void GuiDrawText(const char *text, Rectangle bounds, int alignment, Color if ((codepoint != ' ') && (codepoint != '\t')) { // TODO: Draw only required text glyphs fitting the bounds.width, '...' can be appended at the end of the text - if (textOffsetX < bounds.width) + if (textOffsetX < (bounds.width - guiFont.recs[index].width)) { DrawTextCodepoint(guiFont, codepoint, RAYGUI_CLITERAL(Vector2){ position.x + textOffsetX, position.y + textOffsetY }, (float)GuiGetStyle(DEFAULT, TEXT_SIZE), tint); }