Actor > Textfeld

Actor > Textfeld#

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

Erzeugt ein Textfeld mit fester Breite und Höhe

Parameter:
  • position (Tuple[float, float]) – Die obere linke Position des Textfelds

  • width (float) – Die Breite des Textfeldes

  • height (float) – Die Höhe des Textfelds

  • **border (bool) – Hat das Textfeld einen Rahmen?

  • **font_size (int) – Die Schriftgröße

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

Erstellt eine neue Textzeile

Rückgabetyp:

Text

Parameter:
  • position (_type_) – Position der Linie

  • txt (str, optional) – Text der Zeile. Standardmäßig „“.

Rückgabe:

Ein Text-Actor

Rückgabetyp:

text.Text

create_line_actors()[Quellcode]

erstellt die Zeilen Actor - Ein Actor pro Zeile. Lange Zeilen nach Wörtern trennen.