Actor > Textbox

Actor > Textbox#

class miniworlds.actors.texts.textbox.TextBox(position, width, height, **kwargs)[source]
__init__(position, width, height, **kwargs)[source]

Generates a textbox with fixed width and height

Parameters:
  • position (Tuple[float, float]) – The topleft position of textbox

  • width (float) – The width of the textbox

  • height (float) – The height of the textbox

  • **border (bool) – Does the textbox has a border?

  • **font_size (int) – The font size

create_line(position, txt='')[source]

Creates a new text-line

Return type:

Text

Parameters:
  • position (_type_) – position of line

  • txt (str, optional) – Text of line. Defaults to “”.

Returns:

A Text-Actor

Return type:

text.Text

create_line_actors()[source]

creates the lines actor - One actor per line. Split long lines after words.