dot big bang

Developer API
Menu

Class UITextElement

All
  • Public
  • Public/Protected
  • All

Hierarchy

Index

Constructors

constructor

Methods

getColor

  • Get the color of the text being displayed by this element.

    Parameters

    • Optional optionalTarget: Color

      If provided, returns the color into this object rather than allocating a new one.

    Returns Color

getPosition

  • Returns the position in UI-position units of the element.

    Parameters

    • Optional optionalTarget: Vector2

      If provided, return the position in this object rather than allocating a new one.

    Returns Vector2

getSize

  • getSize(): number
  • Gets the size of the element in UI-size units.

    Returns number

getText

  • getText(): string
  • Returns the text currently displayed by this text element.

    Returns string

isVisible

  • isVisible(): boolean
  • Indicates whether this element is visible or not.

    Returns boolean

setColor

  • setColor(color: Color): void
  • Sets the color of the text displayed by this element.

    Parameters

    Returns void

setPosition

  • setPosition(position: Vector2): void
  • Sets the position of this element, in UI-position units.

    Parameters

    • position: Vector2

      The position, in UI-position units.

    Returns void

setSize

  • setSize(size: number): void
  • Sets the size of the element in UI-size units.

    Parameters

    • size: number

    Returns void

setText

  • setText(text: string): void
  • Sets the text that this element displays.

    Parameters

    • text: string

    Returns void

setVisible

  • setVisible(visible: boolean): void
  • Sets the visibility of the element (i.e. hide or show) in the UI.

    Parameters

    • visible: boolean

      Use true to show the element or false to hide it.

    Returns void