Fork me on GitHub

layers 1.0.18

node:

Global

THE
active_layers()
FUNCTION
mixer
layers 1.0.18
category
Layers
{
Overview

active_layers returns a list of the active layers.

This function returns a comma separated list of the currently active layers.

*
This function has no arguments
Example
%active_layers = active_layers()
match(%active_layers) {
  with(/(?=.*foo)(?=.*bar)/) {
    log("layers foo and bar are active!")
  }
}
»
View Source
node:

Global

mixer
layers 1.0.18
category
Layers
{
Overview

layer executes a block of code if the specified layer is active.

This function will execute the block of Tritium code if the specified layer is currently active. This function can be nested with itself and the layer_not function to specify execution of a block of Tritium code only when a specific combination of layers are active and inactive.

*
Argument
Type
Name
Text %layer
Example
layer("bar") {
  log("Layer bar is active")
  layer("foo") {
    log("... and so is layer foo!")
  }
  layer_not("baz") {
    log("... and layer baz is NOT active!")
  }
}
»
View Source
node:

Global

mixer
layers 1.0.18
category
Layers
{
Overview

layer_not executes a block of code if the specified layer is not active.

This function will execute the block of Tritium code if the specified layer is NOT currently active. This function can be nested with itself and the layer function to specify execution of a block of Tritium code only when a specific combination of layers are active and inactive.

*
Argument
Type
Name
Text %layer
Example
layer_not("bar") {
  log("Layer bar is NOT active")
  layer_not("foo") {
    log("... and neither is layer foo!")
  }
  layer("baz") {
    log("... but layer baz is active!")
  }
}
»
View Source
node:

Global

mixer
layers 1.0.18
category
Layers
{
Overview

query_layer returns a string value indicating whether or not the specified layer is active.

This function will return the string "1" if the specified layer is active. It will return the string "0" otherwise.

*
Argument
Type
Name
Text %layer
Example
match(query_layer("foo"), "1") {
  log("Layer foo is active")
}
match(query_layer("bar"), "0") {
  log("Layer bar is NOT active")
}
»
View Source