4 Commits

Author SHA1 Message Date
Ray
ca17a68d1a Update raygui.h 2026-10-14 19:04:22 +02:00
Ray
9cb5cfa732 Update raygui.h 2026-10-06 19:13:00 +02:00
Ray
45a40cd0a6 Update raygui.h 2026-10-06 18:35:43 +02:00
Ray
c2d948f565 Update raygui.h 2026-10-05 09:39:13 +02:00

View File

@ -723,11 +723,13 @@ typedef enum {
} GuiComboBoxProperty;
// DropdownBox
// TODO: Support dropdown with scrollbar
typedef enum {
ARROW_PADDING = 16, // DropdownBox arrow separation from border and items
DROPDOWN_ITEMS_SPACING, // DropdownBox items separation
DROPDOWN_ARROW_HIDDEN, // DropdownBox arrow hidden
DROPDOWN_ROLL_UP // DropdownBox roll up flag: 0-Roll down, 1-Roll up
DROPDOWN_ROLL_UP, // DropdownBox roll up flag: 0-Roll down, 1-Roll up
DROPDOWN_MAX_HEIGHT // DropdownBox max height, using scrollbar if required, 0-No limit
} GuiDropdownBoxProperty;
// TextBox/TextBoxMulti/ValueBox/Spinner
@ -1877,7 +1879,7 @@ int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector
{
// Move panel bounds after the header bar
bounds.y += (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT - 1;
bounds.height -= (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT + 1;
bounds.height -= ((float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT - 1);
}
bool hasHorizontalScrollBar = (content.width > bounds.width - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH))? true : false;
@ -3893,10 +3895,14 @@ int GuiTabBarEx(Rectangle bounds, char **text, int count, int *hscroll, int *act
int tabItemsWidth = GuiGetStyle(TABBAR, TAB_ITEMS_WIDTH);
Rectangle tabBounds = { bounds.x, bounds.y, (float)tabItemsWidth, bounds.height };
int prevActive = 0;
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
offsetX = (*active*tabItemsWidth) - GetScreenWidth();