Skip to content

UI.Variable

Name Mandatory Description Default Type
⬅️ Input The value is ignored. Any
Output ➡️ The output of this shard will be its input passed through unchanged. Any
Variable No The variable that holds the value. none Var(Any)
Labeled No If the name of the variable should be visible as a label. none Bool

This shard creates a UI element that displays and allows interaction with the variable specified in the Variable parameter.

Details

Any changes to the value of the variable made through the UI element created by this shard will be reflected on the parent wire. Vice versa, any changes made to the variable on the parent wire will be reflected on the UI element created by this shard.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
@wire(ui-wire {
  UI.Window(
    Position: @f2(0 0)
    Anchor: Anchor::Center
    Width: 200
    Height: 200
    Flags: [WindowFlags::NoResize]
    Contents: {
      UI.CentralPanel(
      UI.Variable(my-var))
    }
  )
} Looped: true)

{ui-behavior: ui-wire}