From 42cc62e85399ea3bb8aab36ce9a9bb5f293affef Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 10 Jan 2023 20:57:31 +0100 Subject: [PATCH] ADDED: `GuiSetIconScale()` --- src/raygui.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/raygui.h b/src/raygui.h index e9911bc..1412194 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -572,6 +572,7 @@ RAYGUIAPI const char *GuiIconText(int iconId, const char *text); // Get text wit RAYGUIAPI unsigned int *GuiGetIcons(void); // Get raygui icons data pointer RAYGUIAPI char **GuiLoadIcons(const char *fileName, bool loadIconsName); // Load raygui icons file (.rgi) into internal icons data RAYGUIAPI void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color); +RAYGUIAPI void GuiSetIconScale(int scale); // Set icon drawing size #if !defined(RAYGUI_CUSTOM_ICONS) //---------------------------------------------------------------------------------- @@ -3796,6 +3797,13 @@ void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color) } } } + +// Set icon drawing size +void GuiSetIconScale(int scale) +{ + if (scale >= 1) guiIconScale = scale; +} + #endif // !RAYGUI_NO_ICONS //----------------------------------------------------------------------------------