/ HALion Developer Resource / HALion Macro Page / Controls /

Slider

(SVG support since HALion 7.0)

Description

The Slider control allows to create a variety of different slider types. You can choose between horizontal and vertical sliders, decide whether the slider should jump to the click position or move relatively to it. Furthermore, it can also be inverted in its behavior. The Slider can be resized with all its bitmaps according to the Scale Modes that are defined for the respective Bitmap resources. The Slider can use a Background bitmap which can also be an animated bitmap with frames. This allows you to build animated sliders that only display an animation. The Slider can use Pre-Handle and Post-Handle bitmaps, which are drawn from the left edge to the handle position and from the handle position to the right edge (Bottom → Handle → Top, for vertical sliders). When moving the slider, both bitmaps are clipped at the handle position. Alternatively, you can also stretch both bitmaps towards the handle position. The Slider can display a Handle bitmap, which is drawn on top oft the Background, Pre-Handle and Post-Handle bitmaps.

Properties

PopertyDescription
NameThe name of the element. This name will be displayed in the GUI Tree.
Position/SizePosition X, Position Y, Width, Height: Position and size of the element in pixels. Position X/Y defines the position of the upper left corner.
AttachDefines how an element behaves when its parent element is resized. You can set the following parameters:
  • Left: If the parent element is resized, the element remains attached to left edge, with the specified ratio.
  • Right: If the parent element is resized, the element moves relatively to the right edge, with the specified ratio.
  • Top: If the parent element is resized, the element remains attached to top edge, with the specified ratio.
  • Bottom: If the parent element is resized, the element moves relatively to the bottom edge, with the specified ratio.
  • Left + Right: If the parent element is resized, the element is resized horizontally relatively to the left and right edges, with the specified ratio.
TooltipText that appears as a tooltip when the mouse hovers over the element.
ValueDrag and drop a parameter from the Parameter List to this text field to establish a connection. The assigned parameter will be displayed. Alternatively, you can export the property, which can then be used as a template parameter on a template instance.
Show ValueActivate this if you want to display a tooltip with the current parameter value when using the control. This option can be exported to the template level. The exported parameter can then be activated by setting it to true (the default is false).
Style
  • Vertical: Creates a vertical slider. The default setting is horizontal.
  • Jump: The slider jumps to the click position. By default, it moves relatively to the click position.
  • Invert: Inverts the slider movement.
  • Split: Use the Pre-Handle and Post-Handle bitmaps for drawing. The background bitmap is disabled in this mode. By default, the slider is created with Split off. In this case, the Background and Handle bitmaps are used.
  • Stretch: Pre-Handle and Post-Handle bitmaps are stretched to fill the area between edge and handle. By default, the bitmaps are clipped at the handle position.
  • Scalable: The slider can be resized, and all Bitmap resources are scaled with their defined Scaled Mode.
  • Read-Only: Activate this option if you want to use the slider as a display-only parameter which cannot be edited. (Since HALion 6.1)
Bitmaps
  • Background: Specifies the bitmap to be used as background. It will be animated if the Bitmap resource provides multiple frames. Alternatively, you can use a SVG resource which can also be animated. (SVG support since HALion 7.0)
  • Pre-Handle: Specifies the bitmap to be used for the area from the start to the handle position.
  • Post-Handle: Specifies the bitmap to be used for the area from the handle position to the end.
  • Handle: Specifies the bitmap to be used as slider handle. Alternatively, you can use a SVG resource which can also be animated. (SVG support since HALion 7.0)