API Docs for:
Show:

Component_BindingHandler Class

Module: ui

A binding-handler component allows a UI game object to execute property-bindings.

For example: A text-label can bind its text-property to a backend-field like the current music-volume to always display correct music-volume. If the volume changes, the text-property will be updated automatically.

To define a binding, a special property-path syntax is used. For example:

$myTextField.text

is a property-path to access the text-property of a text-field object with the identifier "myTextField". For more information, take a look into the "In Game UI System" section of the help-file.

Methods

executeBinding

(
  • binding
)

Executes a specified binding. The binding is only executed if all assigned events and conditions are true.

Parameters:

  • binding Object
    • The binding to execute.

executeBinding

(
  • binding
)
static

Executes a specified binding. The binding is only executed if all assigned events and conditions are true.

Parameters:

  • binding Object
    • The binding to execute.

fieldValue

(
  • object
  • path
)
Object static

Evaluates a property-path on a specified object and returns the result.

Parameters:

  • object Object
    • An object to evaluate the property-path on.
  • path String
    • A property-path.

Returns:

Object:

The value of the property-path.

fieldValue

(
  • path
)
Object

Evaluates a specified property-path and returns the result.

Parameters:

  • path String
    • A property-path.

Returns:

Object:

The value of the property-path.

fieldValue

(
  • object
  • path
)
Object static

Evaluates a property-path on a specified object and returns the result.

Parameters:

  • object Object
    • An object to evaluate the property-path on.
  • path String
    • A property-path.

Returns:

Object:

The value of the property-path.

fieldValue

(
  • path
)
Object

Evaluates a specified property-path and returns the result.

Parameters:

  • path String
    • A property-path.

Returns:

Object:

The value of the property-path.

resolveFieldPath

(
  • object
  • path
)
Object static

Resolves a property-path of a specified object and returns the result. The result-object has a get- and an optional set-function to get or set the value for the property-path. The set-function is only present for property-paths which can be written.

Parameters:

  • object Object
    • An object to evaluate the property-path on.
  • path String
    • A property-path.

Returns:

Object:

The result-object containing a get- and set-function to manipulate the property-value.

resolveFieldPath

(
  • object
  • path
)
Object

Resolves a property-path and returns the result. The result-object has a get- and an optional set-function to get or set the value for the property-path. The set-function is only present for property-paths which can be written.

Parameters:

  • object Object
    • An object to evaluate the property-path on.
  • path String
    • A property-path.

Returns:

Object:

The result-object containing a get- and set-function to manipulate the property-value.

setup

()

Initializes the binding-handler.

setup

()

Initializes the binding-handler.

update

()

Updates the binding-handler.

update

()

Updates the binding-handler.

Properties

compiledPaths

Object static

Provided by the gs module.

Caches already compiled binding-paths.