Image & Canvas canvasProgressBar

$canvasProgressBar

Draws a progress bar (horizontal or vertical) with background, fill, and optional border

Syntax
$canvasProgressBar[x;y;width;height;value;fillColor;bgColor?;borderColor?;borderWidth?;direction?;borderRadius?;container?]

Parameters

Parameter Type Required Default Description
x integer check_circle Required Top-left X coordinate
y integer check_circle Required Top-left Y coordinate
width integer check_circle Required Bar width in pixels
height integer check_circle Required Bar height in pixels
value number check_circle Required Percentage filled (0–100). Supports variables.
fillColor color check_circle Required Color of the filled portion
bgColor color Optional Background color of the unfilled portion
borderColor color Optional Border color
borderWidth integer Optional 0 Border thickness in pixels
direction string Optional Bar orientation
horizontal vertical
borderRadius integer Optional 0 Corner radius (accepted by transpiler, not yet rendered at runtime)
container string Optional Container name

Return Value

canvas

Modifies the canvas in-place.

The value parameter should be a number between 0 and 100 representing the fill percentage. If bgColor is omitted, the unfilled portion is left transparent. Note: the borderRadius parameter is accepted by the transpiler but is not yet rendered at runtime — rounded progress bars will appear with sharp corners. Horizontal bars fill left-to-right; vertical bars fill bottom-to-top.

Examples

XP progress bar

$canvasProgressBar[20;100;300;24;$getUserVar[xp];43A047;#555555;#FFFFFF;1;horizontal]

Vertical health bar

$canvasProgressBar[400;50;30;200;75;E53935;#333333;#FFFFFF;2;vertical]