Appearance
types.rect_drawable
A drawable rectangle
Functions
new(): types.rect_drawable
Creates a new rect drawable
- returns (
types.rect_drawable) A new rect drawable instance
position(x : number, y : number): types.rect_drawable
Sets the position
- x (
number) The x position - y (
number) The y position - returns (
types.rect_drawable) The rect drawable instance
bounds(width : number, height : number): types.rect_drawable
Sets the bounds
- width (
number) The width - height (
number) The height - returns (
types.rect_drawable) The rect drawable instance
base_color(color : types.color): types.rect_drawable
Sets the base color
- color (
types.color) The base color - returns (
types.rect_drawable) The rect drawable instance
grad_color(color : types.color): types.rect_drawable
Sets the gradient color
- color (
types.color) The gradient color - returns (
types.rect_drawable) The rect drawable instance
gradient_mode(mode : enums.gradient_mode): types.rect_drawable
Sets the gradient mode
- mode (
enums.gradient_mode) The gradient mode - returns (
types.rect_drawable) The rect drawable instance
corner_radii(all : number): types.rect_drawable
Sets the corner radii
- all (
number) The radius for all corners (when using 1 argument) - tl (
number) The top-left radius (when using 4 arguments) - tr (
number) The top-right radius (when using 4 arguments) - bl (
number) The bottom-left radius (when using 4 arguments) - br (
number) The bottom-right radius (when using 4 arguments) - returns (
types.rect_drawable) The rect drawable instance
outline(thickness : number, color : types.color): types.rect_drawable
Sets the outline
- thickness (
number) The outline thickness - color (
types.color) The outline color - returns (
types.rect_drawable) The rect drawable instance
texture(texture : types.texture): types.rect_drawable
Sets the texture
- texture (
types.texture) The texture instance - returns (
types.rect_drawable) The rect drawable instance
blur(opacity : number): types.rect_drawable
Sets the blur
- opacity (
number) The blur opacity (0.0 to 1.0) - returns (
types.rect_drawable) The rect drawable instance
insert(canvas : types.ui_canvas)
Inserts the drawable into a canvas
- canvas (
types.ui_canvas) The canvas to insert into
