Widgets SLIDER - thica/ORCA-Remote GitHub Wiki

Slider

The slider widget provides the function of a slider. If you move the slider by mouse or by touch, an action is triggered. You can add a text to the slider knob as well If you want to set the position of the slider (The Button Picture), you have to set [PREFIX]_value and the call the updatewidget action. The following attributes are additional attributes to common widget and text attributes

Attribute Description
type fixed: needs to be "SLIDER". Capital letters!
picturenormal The background picture to show. This pictrure will be shrinked to 25% of its height to have a transparent background
picturebutton The button picture to show. Could be a round or a square pricture
mindatavalue This is the value, which is assigned to the slider, when it reaches the left boundary. Data values are float values, so you can use small numbers as well.
maxdatavalue This is the value, which is assigned to the slider when it reaches the right boundary.
direction The direction of the slider: Could be eiter
  • horizontal
  • vertical
destvar This is the PREFIX for the variable, which holds the status of the slider. The slider widgets sets/updates the following variable, when it get moved:
  • [PREFIX]_value: The value assigned to the slider position within the data range.
roundpos The position in digits, the [PREFIX]_value should be rounded. Examples: If the [PREFIX]_value is 10.623:
  • "0" will round to 11
  • "1" will round to 10.6
discardmoves If you set this attribute to "1", you just get a notification, when the user finishes moving the widget. If not set, you get (a lot of) notifications, while the user is moving the widget on the screen. Can be usefull, if you would like to avoid an interface being swamped by commands.

Below you see an example for a slider

<element name="Amp Volume Center" type="SLIDER" posx="center" posy="middle" width="%70" height="%75" picturenormal="background boxes" picturebutton="button round normal" action="Set Center Volume By Widget"  mindatavalue="-12" maxdatavalue="12" destvar="volume_center" roundpos="0" orientation="vertical" discardmoves="1" fontsize='%w50' caption='icon:volume_up'/>
⚠️ **GitHub.com Fallback** ⚠️