diff --git a/src/raygui.h b/src/raygui.h index 5c0bc60..98de9d8 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -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) {