From 8b9e1ee94b67681403a66f38743401318296a57e Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 6 May 2019 09:22:26 +0200 Subject: [PATCH] Avoid rIcons code if not supported --- src/raygui.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index 77d4f64..f16419d 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -626,7 +626,8 @@ static void GuiDrawText(const char *text, Rectangle bounds, int alignment, Color // NOTE: We get text size after icon been processed int textWidth = GetTextWidth(text); int textHeight = GuiGetStyle(DEFAULT, TEXT_SIZE); - + +#if defined(RAYGUI_RICONS_SUPPORT) if (iconId > 0) { 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! if ((text != NULL) && (text[0] != '\0')) textWidth += ICON_TEXT_PADDING; } - +#endif // Check guiTextAlign global variables switch (alignment) {