mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-26 21:35:03 +00:00
Update raygui.h
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user