mirror of
https://github.com/raysan5/raygui.git
synced 2026-02-02 12:19:17 -05:00
Update raygui.h
This commit is contained in:
@ -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
|
// 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);
|
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);
|
textBoundsPosition.x += (float)(RAYGUI_ICON_SIZE*guiIconScale + ICON_TEXT_PADDING);
|
||||||
textBoundsWidthOffset = (RAYGUI_ICON_SIZE*guiIconScale + ICON_TEXT_PADDING);
|
textBoundsWidthOffset = (float)(RAYGUI_ICON_SIZE*guiIconScale + ICON_TEXT_PADDING);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// Get size in bytes of text,
|
// 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 textOffsetX = 0.0f;
|
||||||
float glyphWidth = 0;
|
float glyphWidth = 0;
|
||||||
|
|
||||||
float ellipsisWidth = GetTextWidth("...");
|
int ellipsisWidth = GetTextWidth("...");
|
||||||
bool overflowReached = false;
|
bool overflowReached = false;
|
||||||
for (int c = 0, codepointSize = 0; c < lineSize; c += codepointSize)
|
for (int c = 0, codepointSize = 0; c < lineSize; c += codepointSize)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user