Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Widget

Superclass for UI elements. Doesn't have functionality by itself, use child subclasses instead.

Hierarchy

Index

Methods

getOwningObject

  • Return the game object that this UI element is attached to. Returns undefined if the element isn't attached to a game object.

    Returns GameObject | undefined

getParent

  • getParent(): Widget | undefined
  • Return the widget that contains this widget, for example a border that wraps a check box. Returns undefined if this object has no parent.

    Returns Widget | undefined

isEnabled

  • isEnabled(): boolean

setEnabled

  • setEnabled(enabled: boolean): Widget
  • Set whether the widget is enabled. When a widget is disabled, users can't interact with it and it is greyed out. When a widget that contains other widgets (like VerticalBox) is disabled, all its children behave as if disabled, too. By default, widgets are enabled.

    Parameters

    • enabled: boolean

      Whether to enable the widget.

    Returns Widget