Update raygui.h

This commit is contained in:
Ray
2026-02-24 00:51:20 +01:00
parent 43d8933404
commit 3f36c2d3f5

View File

@@ -646,6 +646,7 @@ typedef enum {
// ProgressBar
typedef enum {
PROGRESS_PADDING = 16, // ProgressBar internal padding
PROGRESS_SIDE, // ProgressBar increment side: 0-left->right, 1-right-left
} GuiProgressBarProperty;
// ScrollBar
@@ -3522,7 +3523,15 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight
}
// Draw slider internal progress bar (depends on state)
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
if (GuiGetStyle(PROGRESSBAR, PROGRESS_SIDE) == 0) // Left-->Right
{
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
}
else // Right-->Left
{
progress.x = bounds.x + bounds.width - progress.width - GuiGetStyle(PROGRESSBAR, BORDER_WIDTH);
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
}
}
// Draw left/right text if provided