Skip to content
Phil T edited this page Jan 27, 2021 · 2 revisions

This page contains information on all functions provided within the windower.text table.

Note that these functions are very rudimentary and involve a lot of work to get simple things done. The text objects created will not update, save their properties, or be draggable. To get any of that functionality, use the Texts Library.


Each of these functions takes a name parameter which identifies the text object to modify.

windower.text.create(name)

Creates a text object.

windower.text.delete(name)

Destroys a text object.

windower.text.get_extents(name)

Returns two values, the x and y of its size.

windower.text.get_location(name)

Returns two values, the x and y of its top-left position.

windower.text.set_bg_border_size(name, px)

  • pxinteger - Pixels

Sets the border size.

windower.text.set_bg_color(name, alpha, red, green, blue)

  • alphainteger - Alpha value, 0 to 255
  • redinteger - Red value, 0 to 255
  • greeninteger - Green value, 0 to 255
  • blueinteger - Blue value, 0 to 255

Sets the color of the text background.

windower.text.set_bg_visibility(name, visible)

  • `` bool - true or `false`

Sets the visible of the text background.

windower.text.set_bold(name, bold)

  • `` bool - true or `false`

Sets the font bold, if true was specified, otherwise resets to the non-bold default.

windower.text.set_color(name, alpha, red, green, blue)

  • alphainteger - Alpha value, 0 to 255
  • redinteger - Red value, 0 to 255
  • greeninteger - Green value, 0 to 255
  • blueinteger - Blue value, 0 to 255

Sets the color of the font.

windower.text.set_font(name, font1, font2, [...])

  • fontxstring - Font name

Sets the text object's font to the specified font, if available. Can now accept multiple fonts as fallbacks if the previous is not installed

windower.text.set_font_size(name, size)

  • sizeinteger - Font size

Sets the text object's font size.

windower.text.set_italic(name, italic)

  • italicbool - true or false

Sets the font italic, if true was specified, otherwise resets to the non-italic default.

windower.text.set_location(name, x, y)

  • xinteger - Horizontal position
  • yinteger - Vertical position

Moves the text object to the specified pixel coordinates.

windower.text.set_right_justified(name, justified)

  • namestring - Name of the text object
  • justifiedbool - true or false

Right-justifies the text object, if true is provided, otherwise resets it to the left-justified default.

windower.text.set_stroke_color(name, alpha, red, green, blue)

  • namestring - Name of the text object
  • alphainteger - Transparency value, 0 to 255
  • redinteger - Red amount, 0 to 255
  • greeninteger - Green amount, 0 to 255
  • blueinteger - Blue amount, 0 to 255

Sets the text outline's stroke color and transparency.

windower.text.set_stroke_width(name, width)

  • namestring - Name of the text object
  • widthnumber - Stroke size in pixels

Sets the text outline's stroke width in pixels.

windower.text.set_text(name, text)

  • textstring - The text to display

Sets the text to display in the text object.

windower.text.set_visibility(name, visible)

  • visiblebool - true or false

Sets the visible of the text object.

Clone this wiki locally