Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TextComponent

The Text Component simply visualizes any given text. This can either be a single centered text, or split up into a left and right text, which is suitable for a situation where you have a label and a value.

Hierarchy

Index

Constructors

constructor

Properties

ptr

ptr: number

Methods

dispose

  • dispose(): void
  • Disposes the object, allowing it to clean up all of its memory. You need to call this for every object that you don't use anymore and hasn't already been disposed.

    Returns void

intoGeneric

  • Converts the component into a generic component suitable for using with a layout.

    Returns Component

setCenter

  • setCenter(text: string): void
  • Sets the centered text. If the current mode is split, it is switched to centered mode.

    Parameters

    • text: string

    Returns void

setLeft

  • setLeft(text: string): void
  • Sets the left text. If the current mode is centered, it is switched to split mode, with the right text being empty.

    Parameters

    • text: string

    Returns void

setRight

  • setRight(text: string): void
  • Sets the right text. If the current mode is centered, it is switched to split mode, with the left text being empty.

    Parameters

    • text: string

    Returns void

state

stateAsJson

with

  • Allows for scoped usage of the object. The object is guaranteed to get disposed once this function returns. You are free to dispose the object early yourself anywhere within the scope. The scope's return value gets carried to the outside of this function.

    Type parameters

    • T

    Parameters

    Returns T

Static new

  • Creates a new Text Component.

    Returns TextComponent

Generated using TypeDoc