Skip to content

Button

Button screenshot

The button is the fundamental UI element in the universe and possesses two command stacks. It can be activated directly from the interface, by other controls within the universe, or by input from external devices. Besides the standard appearance settings, the button can also be styled using graphics for different states. The button's behavior is defined by the mode.

Modes

Press/Release

In Press/Release mode the button is only in Press state after the touch down event. As soon as touch up is registered, the button will switch back to Released state.

Toggle

In Toggle mode the button changes its state with every click event (touch up & touch down).

Playlist

In Playlist mode the commands in the release stack are executed in a top-down sequence. Additionally all commands can be given an Alias. The Aliases of the previous and next command are displayed above and below the Button on the stage.

Command Stacks

The button features two distinct command stacks for the press and release events. By default, the release stack of the button is selected. The press stack executes when the button transitions to the pressed state, while the release stack executes when the button transitions to the released state. The specific behavior depends on the mode of the button:

  • In Press/Release mode, the press stack executes on the touchdown event, and the release stack executes on the touch-up event on the button.
  • In Toggle mode, every click on the button changes the state, causing the press and release stacks to alternate execution.

Input and Output Nodes

The Button has one input and one output node. Connecting the output of a Button to another Control automatically creates a UNIVERSE-Device command for the connected Control.

Nice to know

Radio Button Groups

A radio button group is a collection of buttons where only one button can be active at a time. To implement a radio button group, all buttons must share the same group ID and include a toggle-off command for the group in their press stack. Please note: using the execute release command instead of the toggle-off command will trigger the release stacks of all buttons in the group. Depending on the number of buttons and commands, this can lead to a high system load. See Radio Button Group Demo.