mirror of
https://github.com/raysan5/raylib.git
synced 2026-04-16 12:09:10 -04:00
Update raygui.h
This commit is contained in:
@ -646,6 +646,7 @@ typedef enum {
|
|||||||
// ProgressBar
|
// ProgressBar
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PROGRESS_PADDING = 16, // ProgressBar internal padding
|
PROGRESS_PADDING = 16, // ProgressBar internal padding
|
||||||
|
PROGRESS_SIDE, // ProgressBar increment side: 0-left->right, 1-right-left
|
||||||
} GuiProgressBarProperty;
|
} GuiProgressBarProperty;
|
||||||
|
|
||||||
// ScrollBar
|
// ScrollBar
|
||||||
@ -3522,7 +3523,15 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw slider internal progress bar (depends on state)
|
// 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
|
// Draw left/right text if provided
|
||||||
|
|||||||
Reference in New Issue
Block a user