API Docs for:
Show:

Object_UIElement Class

Module: ui

The base class for all In-Game UI objects.

Methods

restore

(
  • data
)

Restores the object from a data-bundle.

Parameters:

  • data Object
    • The data-bundle.

toDataBundle

() Object

Serializes the object into a data-bundle.

Returns:

Object:

The data-bundle.

Properties

alignment

ui.Alignment

The UI object's alignment.

anchor

gs.Point

The UI object's anchor-point. For example: An anchor-point with 0,0 places the object with its top-left corner at its position but with an 0.5, 0.5 anchor-point the object is placed with its center. An anchor-point of 1,1 places the object with its lower-right corner.

angle

Number

The UI object's rotation-angle in degrees. The rotation center depends on the anchor-point.

breakBindingChain

Boolean

Indicates if that UI object will break the binding-chain. If true the UI object will not change any binding-targets for the current binding-execution period.

clipRect_

gs.Rect protected

The object's clip-rect for visual presentation.

color

gs.Color

The UI object's color.

dstRect

ui.Component_UIElementRectangle

The UI object's destination rectangle on screen.

enabled

Boolean

Indicates if the UI object is enabled and responds to user actions.

events

gs.Component_EventEmitter

An event-emitter to emit events.

image_

String protected

margin

ui.Space

The UI object's margin. The margin defines an extra space around the UI object. The default is { left: 0, top: 0, right: 0, bottom: 0 }.

mask

gs.Mask

The UI object's mask for masking-effects.

offset

gs.Vector2

The UI object's offset.

opacity

Number

The UI object's opacity to control transparency. For example: 0 = Transparent, 255 = Opaque, 128 = Semi-Transparent.

origin

gs.Vector2

The UI object's origin.

padding

ui.Space

The UI object's padding. The default is { left: 0, top: 0, right: 0, bottom: 0 }.

resizable

Boolean

The UI object's resize behavior.

updateBehavior

ui.UpdateBehavior

The update-behavior of the UI object. The default is ui.UpdateBehavior.NORMAL.

visible

Boolean

Indicates if the UI object is visible on screen.

visible_

Boolean protected

zoom

gs.Point

The UI object's zoom-setting for x and y axis. The default value is { x: 1.0, y: 1.0 }