Bar
Description
The bar
command draws a progress bar with customizable dimensions, corner rounding, and fill percentage. The bar is positioned relative to the current draw cursor position and uses the current color for both the outline and fill.
Syntax
Parameters
width
: Total width of the progress bar in pixelsheight
: Height of the progress bar in pixelsrounding
: Radius of the rounded corners in pixelspercent
: Fill percentage as a decimal between 0 and 1 (e.g., 0.75 for 75% filled)
Usage Examples
Important Notes
The bar is drawn using the current color (set with the
c
command)The fill percentage should be between 0 (empty) and 1 (full)
The progress bar is drawn from left to right
Corner rounding can be set to 0 for sharp corners
The bar position is relative to the current draw cursor
Both the outline and fill use the same color
The progress bar maintains its appearance regardless of window scaling
Last updated
Was this helpful?