Layer Action (Experimental)

An action that a button can use to display a layer.

Warning

Layers are currently available for use in experimental form and may change behavior based on early adopter feedback.

Properties

type - "layer". Specifies the type of the action

target - string. The name of the layer that should be shown when the action is taken.

Remarks

The layer action is used to allow the player to cause a layer to be displayed.

If the button is a toggle button, the layer will be displayed until the button is pressed again.

Sample

A toggle button that has a layer action to show the selectAbility layer

{
    "type": "button",
    "action": {
        "type": "layer",
        "target": "selectAbility"
    },
    "styles": {
        "default": {
            "faceImage": {
                "type": "icon",
                "value": "add"
            }
        }
    },
    "toggle" : true
}

See Also

Touch Adaptation Kit Reference
Button
Layer