mirror of
https://github.com/raysan5/raygui.git
synced 2026-02-05 21:59:18 -05:00
Avoid rIcons code if not supported
This commit is contained in:
@ -626,7 +626,8 @@ static void GuiDrawText(const char *text, Rectangle bounds, int alignment, Color
|
|||||||
// NOTE: We get text size after icon been processed
|
// NOTE: We get text size after icon been processed
|
||||||
int textWidth = GetTextWidth(text);
|
int textWidth = GetTextWidth(text);
|
||||||
int textHeight = GuiGetStyle(DEFAULT, TEXT_SIZE);
|
int textHeight = GuiGetStyle(DEFAULT, TEXT_SIZE);
|
||||||
|
|
||||||
|
#if defined(RAYGUI_RICONS_SUPPORT)
|
||||||
if (iconId > 0)
|
if (iconId > 0)
|
||||||
{
|
{
|
||||||
textWidth += RICONS_SIZE;
|
textWidth += RICONS_SIZE;
|
||||||
@ -634,7 +635,7 @@ static void GuiDrawText(const char *text, Rectangle bounds, int alignment, Color
|
|||||||
// WARNING: If only icon provided, text could be pointing to eof character!
|
// WARNING: If only icon provided, text could be pointing to eof character!
|
||||||
if ((text != NULL) && (text[0] != '\0')) textWidth += ICON_TEXT_PADDING;
|
if ((text != NULL) && (text[0] != '\0')) textWidth += ICON_TEXT_PADDING;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// Check guiTextAlign global variables
|
// Check guiTextAlign global variables
|
||||||
switch (alignment)
|
switch (alignment)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user