Update raygui.h

This commit is contained in:
Ray 2024-05-01 18:12:18 +02:00
parent 6f532337ff
commit a3a0e86e21

View File

@ -4797,8 +4797,8 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C
{
// NOTE: We consider icon height, probably different than text size
GuiDrawIcon(iconId, (int)textBoundsPosition.x, (int)(textBounds.y + textBounds.height/2 - RAYGUI_ICON_SIZE*guiIconScale/2 + TEXT_VALIGN_PIXEL_OFFSET(textBounds.height)), guiIconScale, tint);
textBoundsPosition.x += (RAYGUI_ICON_SIZE*guiIconScale + ICON_TEXT_PADDING);
textBoundsWidthOffset = (RAYGUI_ICON_SIZE*guiIconScale + ICON_TEXT_PADDING);
textBoundsPosition.x += (float)(RAYGUI_ICON_SIZE*guiIconScale + ICON_TEXT_PADDING);
textBoundsWidthOffset = (float)(RAYGUI_ICON_SIZE*guiIconScale + ICON_TEXT_PADDING);
}
#endif
// Get size in bytes of text,
@ -4814,7 +4814,7 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C
float textOffsetX = 0.0f;
float glyphWidth = 0;
float ellipsisWidth = GetTextWidth("...");
int ellipsisWidth = GetTextWidth("...");
bool overflowReached = false;
for (int c = 0, codepointSize = 0; c < lineSize; c += codepointSize)
{