mirror of
https://github.com/raysan5/raygui.git
synced 2026-10-16 14:41:55 -04:00
Compare commits
1 Commits
9cb5cfa732
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| ca17a68d1a |
12
src/raygui.h
12
src/raygui.h
@ -3895,12 +3895,16 @@ int GuiTabBarEx(Rectangle bounds, char **text, int count, int *hscroll, int *act
|
|||||||
int tabItemsWidth = GuiGetStyle(TABBAR, TAB_ITEMS_WIDTH);
|
int tabItemsWidth = GuiGetStyle(TABBAR, TAB_ITEMS_WIDTH);
|
||||||
Rectangle tabBounds = { bounds.x, bounds.y, (float)tabItemsWidth, bounds.height };
|
Rectangle tabBounds = { bounds.x, bounds.y, (float)tabItemsWidth, bounds.height };
|
||||||
|
|
||||||
if (*active < 0) *active = 0;
|
int prevActive = 0;
|
||||||
else if (*active > count - 1) *active = count - 1;
|
if (active != NULL)
|
||||||
|
{
|
||||||
|
if (*active < 0) *active = 0;
|
||||||
|
else if (*active > count - 1) *active = count - 1;
|
||||||
|
|
||||||
int prevActive = (active == NULL)? 0 : *active;
|
prevActive = *active;
|
||||||
|
}
|
||||||
|
|
||||||
int offsetX = 0; // Required in case tabs go out of screen
|
int offsetX = 0; // Required in case tabs go out of screen
|
||||||
offsetX = (*active*tabItemsWidth) - GetScreenWidth();
|
offsetX = (*active*tabItemsWidth) - GetScreenWidth();
|
||||||
if (offsetX < 0) offsetX = 0;
|
if (offsetX < 0) offsetX = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user