From 926fdf91cc536fca0fac847bb7e7f2c3abefd166 Mon Sep 17 00:00:00 2001 From: Hanaxar <87268284+hanaxar@users.noreply.github.com> Date: Wed, 19 Apr 2023 18:01:47 +0300 Subject: [PATCH] Fix error in GuiTabBar (#271) When ```RAYGUI_NO_ICONS``` defined, getting errors in ```GuiTabBar```. It seems this is copied from ```GuiWindowBox``` and then not edited and forgotten. --- src/raygui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raygui.h b/src/raygui.h index 9f6d2f1..e332a5d 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -1566,7 +1566,7 @@ int GuiTabBar(Rectangle bounds, const char **text, int count, int *active) GuiSetStyle(BUTTON, BORDER_WIDTH, 1); GuiSetStyle(BUTTON, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER); #if defined(RAYGUI_NO_ICONS) - if (GuiButton(closeButtonRec, "x")) closing = i; + if (GuiButton(RAYGUI_CLITERAL(Rectangle){ tabBounds.x + tabBounds.width - 14 - 5, tabBounds.y + 5, 14, 14 }, "x")) closing = i; #else if (GuiButton(RAYGUI_CLITERAL(Rectangle){ tabBounds.x + tabBounds.width - 14 - 5, tabBounds.y + 5, 14, 14 }, GuiIconText(ICON_CROSS_SMALL, NULL))) closing = i; #endif