API Docs for:
Show:

UIManager Class

Module: ui

Handles the creation of In Game UI elements. For more information about In-Game UI see help file.

Methods

_createFromDescriptor

(
  • descriptor
  • parent
)
gs.Object_UIElement protected

Creates an UI object from a specified UI descriptor.

Parameters:

  • descriptor Object
    • The UI object descriptor.
  • parent gs.Object_UIElement
    • The UI parent object. (A layout for example).

Returns:

gs.Object_UIElement:

The created UI object.

addControlStyles

(
  • control
  • styles
)

Adds the styles defined in an array of style-names to the specified control.

Parameters:

  • control Object
    • The control to add the styles to.
  • styles String
    • Array of style-names to add.

createCalcFunction

(
  • expression
)
Function protected

Creates a calculation for a specified expression.

Parameters:

  • expression String
    • The expression to create a calculation function for.

Returns:

Function:

The calculation function.

createControl

(
  • descriptor
)
gs.Object_UIElement protected

Creates an UI object depending on the object-type of the specified UI descriptor.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created UI object.

createControlFromDescriptor

(
  • descriptor
  • parent
  • index
)
gs.Object_UIElement protected

Creates an UI object from a specified UI descriptor. This method is called recursively for all child-descriptors.

Parameters:

  • descriptor Object
    • The UI object descriptor.
  • parent gs.Object_UIElement
    • The UI parent object. (A layout for example).
  • index Number
    • The index.

Returns:

gs.Object_UIElement:

The created UI object.

createDataGrid

(
  • descriptor
)
gs.Object_UIElement

Creates a data-grid UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createFrame

(
  • descriptor
)
gs.Object_UIElement

Creates a frame UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createFreeLayout

(
  • descriptor
)
gs.Object_UIElement

Creates a free-layout UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createFromDescriptor

(
  • descriptor
  • parent
)
gs.Object_UIElement

Creates an UI object from a specified UI descriptor.

Parameters:

  • descriptor Object
    • The UI object descriptor.
  • parent gs.Object_UIElement
    • The UI parent object. (A layout for example).

Returns:

gs.Object_UIElement:

The created UI object.

createGridLayout

(
  • descriptor
)
gs.Object_UIElement

Creates a grid-layout UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createImage

(
  • descriptor
)
gs.Object_UIElement

Creates an image UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createImageButton

(
  • descriptor
)
gs.Object_UIElement

Creates an image button UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createImageMap

(
  • descriptor
)
gs.Object_UIElement

Creates an image map UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createMessage

(
  • descriptor
)
gs.Object_UIElement

Creates a message UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createObject

(
  • type
)
Object protected

Creates an object from the specified object type. The type has the format . like vn.Component_Hotspot.

Parameters:

  • type String
    • The type name.

Returns:

Object:

The created object.

createPanel

(
  • descriptor
)
gs.Object_UIElement

Creates a panel UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createSpreadLayout

(
  • descriptor
)
gs.Object_UIElement

Creates a spread-layout UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createStackLayout

(
  • descriptor
)
gs.Object_UIElement

Creates a stack-layout UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createText

(
  • descriptor
)
gs.Object_UIElement

Creates a text UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createThreePartImage

(
  • descriptor
)
gs.Object_UIElement

Creates a three-part image UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

createVideo

(
  • descriptor
)
gs.Object_UIElement

Creates a video UI object.

Parameters:

  • descriptor Object
    • The UI object descriptor.

Returns:

gs.Object_UIElement:

The created image button UI object.

executePlaceholderFormulas

(
  • descriptor
  • params
)
protected

Executes all placeholder formulas in the specified descriptor. The descriptor will be changed and placeholder formulas are replaced with their evaluated result value.

Parameters:

  • descriptor Object
    • The descriptor.
  • params Object
    • Object containing the placeholder params.

setup

()

Sets up UI Manager, optimizes styles, etc.

setupStyles

() protected

Sets up the UI styles by wrapping them into ui.Style objects and optimizing the access.

Properties

alignments

Object protected

Mapping to table to map alignment names to number values.

blendModes

Object protected

Mapping to table to map blend-mode names to number values.

customTypes

Object

Stores all registered custom UI types/templates by name/id.

customTypes

Object

Stores all registered UI controllers by name/id.

customTypes

Object

Stores all registered UI data sources by name/id.

layouts

Object

Stores all registered UI layouts by name/id.

selectors

Object

Mapping to table to map selector names to number values.

styles

Object

Stores all registered UI styles by name/id.

stylesById

ui.Style

Stores all UI styles by number id.

stylesByName

Object

Stores all UI styles by style-name.