Skip to content

types.text_drawable ​

A drawable text

Functions ​

new(): types.text_drawable ​

Creates a new text drawable

text(text : string): types.text_drawable ​

Sets the text

align(align : enums.align): types.text_drawable ​

Sets the alignment

position(x : number, y : number): types.text_drawable ​

Sets the position

  • x (number) The x position
  • y (number) The y position
  • returns (types.text_drawable) The text drawable instance

scale(scale : number): types.text_drawable ​

Sets the scale

width(): number ​

Returns the width of the text

  • returns (number) The width

height(): number ​

Returns the height of the text

  • returns (number) The height

base_color(color : types.color): types.text_drawable ​

Sets the base color

grad_color(color : types.color): types.text_drawable ​

Sets the gradient color

shadow(): types.text_drawable ​

Enables shadow

outline(thickness : number, color : types.color): types.text_drawable ​

Sets the outline

font_face(font : enums.font_face): types.text_drawable ​

Sets the font face

layer(layer : number): types.text_drawable ​

Sets the draw layer; blur includes UI from lower layers

  • layer (number) A non-negative layer (default 0)
  • returns (types.text_drawable) The drawable instance

insert(canvas : types.ui_canvas) ​

Inserts the drawable into a canvas