Properties
Property | Description | ||||
Name | The name of the Switch. | ||||
Position/Size |
| ||||
Attach |
| ||||
Tip |
| ||||
Value |
| ||||
Mode |
| ||||
Style |
| ||||
Template | Here, you can specify the template that is shown when the switch is clicked. (Only available with the Popup style and in HALion 6.3) | ||||
Close on Click |
(Only available with the Popup style and in HALion 6.3) |
Placement | Here, you can specify where on the macro page the popup is shown. The options define the postion of the popup in relation to the switch.
(Only available with the Popup style and in HALion 6.3) |
Bmp Off | Allows you to assign the bitmap that is used for the off state. |
Bmp Off Dn | Allows you to assign the bitmap that is used for the off state with mouse button held down. |
Bmp Off Hv | Allows you to assign the bitmap that is used for the off state when the mouse is hovering over the switch. |
Bmp On | Allows you to assign the bitmap that is used for the on state. |
Bmp On Dn | Allows you to assign the bitmap that is used for the on state with the mouse button pressed. |
Bmp On Hv | Allows you to assign the bitmap that is used for the on state when the mouse is hovering over the switch. |
Onvalue | Allows you to define the value that is sent when the switch is turned on. This option is only available in Exclusive mode. If you want to create a switch template that allows you to specify the Onvalue on a template instance level, you must export this property. Click the Export button on the right of the Onvalue field. Now, a switch template shows the additional Onvalue as a template parameter and you can use the switch template several times and configure each template instance individually. |
State | Allows you to assign a multi-frame bitmap that is used for the different states. (Only available in Mutiple mode and in HALion 6.1) |
State Down | Allows you to assign a multi-frame bitmap that is used for the different states with the mouse button pressed. (Only available in Mutiple mode and in HALion 6.1) |
State Hover | Allows you to assign a multi-frame bitmap that is used for the different states when the mouse is hovering over the switch. (Only available in Mutiple mode and in HALion 6.1) |
Examples
Radio buttons
A radio switch group can be realized by connecting several switches, all set to Exclusive mode, to the same parameter. For each switch, the Onvalue must be specified.
Switching pages
- Create an integer variable, name it "Pages", for example, and specify a range of 0-2.
- Add three (exlusive) switches and set their Values to the variable "Pages".
- Set the Onvalues of the switches to 0,1, and 2.
- Add a Stack with 3 child views and set the stack Value to the variable "Pages", too.
- The switches now allow to switch between the three views.
Hover mode Switch
The hover mode can be used to switch between stack views when hovering over a switch control. Since the switch can also be used invisible, that is, without any bitmap assigned, it can be layered under a knob control and control a stack view switching between the parameter label and a text view displaying the current parameter value. To see how this can be set up, load one of the knobs from the Additional Controls library.