The usage of GuiTabBar() is very limited because its implementation makes a lot of assumptions and hard-codes many default values.
Examples:
- the width of every entry is hard-coded to 160
|
#define RAYGUI_TABBAR_ITEM_WIDTH 160 |
- each entry can be clicked in order to close TabBar, this also draws additional button in top-right corner of every entry
|
// Close tab with middle mouse button pressed |
|
if (CheckCollisionPointRec(GetMousePosition(), tabBounds) && IsMouseButtonPressed(MOUSE_MIDDLE_BUTTON)) result = i; |
- each entry appears with hard-coded icon at the beginning
|
if (GuiButton(RAYGUI_CLITERAL(Rectangle){ tabBounds.x + tabBounds.width - 14 - 5, tabBounds.y + 5, 14, 14 }, GuiIconText(ICON_CROSS_SMALL, NULL))) result = i; |
@raysan5 Would it be fine, if I create a PR with more flexible version of this function (e.g. GuiTabBarEx ) ?
The usage of GuiTabBar() is very limited because its implementation makes a lot of assumptions and hard-codes many default values.
Examples:
raygui/src/raygui.h
Line 1738 in e4a59f0
raygui/src/raygui.h
Lines 1780 to 1781 in e4a59f0
raygui/src/raygui.h
Line 1795 in e4a59f0
@raysan5 Would it be fine, if I create a PR with more flexible version of this function (e.g.
GuiTabBarEx) ?