CreateUiRect
A filled rectangle.
Syntax
Section titled “Syntax”CreateUiRect(name, x, y, w, h [, color, alpha, parent])| Parameter | Type | |
|---|---|---|
name |
string | the element’s name |
x |
number | the left edge |
y |
number | the top edge |
w |
number | the width |
h |
number | the height |
color |
number | 0xRRGGBB (black) (optional) |
alpha |
number | 0 .. 100 (100) (optional) |
parent |
string | a clip’s name (optional) |
Returns
Section titled “Returns”string - the name
Example
Section titled “Example”CreateUiRect("bar_bg", 40, 400, 200, 12, 0x000000, 60)CreateUiRect("bar", 40, 400, 200, 12, 0xB8302A)SetUiSize("bar", 200 * health / maxHealth, 12)See also
Section titled “See also”SetUiSize · SetUiColor · the The game’s UI for a script group of the index
