-
Notifications
You must be signed in to change notification settings - Fork 2
Widgets KNOB
thica edited this page Jan 10, 2020
·
4 revisions
The knob widget provides the function of a turnable button. If you turn the button by mouse or by touch, an action is triggered The knob widget provides two modi:
- Endless turn: You can turn the knob in both directions as much as you like
- Limited turn: You can turn the the knob within defined boundaries. Each position is aligned to a specific level
Attribute | Description |
---|---|
type | fixed: needs to be "KNOB". Capital letters! |
picturenormal | The picture to show. It is advised to use a round picture. If you use a marker, it should point to the upper , center position. |
leftboundaryangle | If you want to have a KNOB with limited turn, you have to provide the angle/degree of the left and right limit. "o" (Null) is top center / North, -90 would be West, 90 would be East |
rightboundaryangle | The angle/degree of the right limit |
mindatavalue | For limited turn KNOBs, this is the value, which is assigned to the Knob, when it reaches the leftboundaryangle. Data values are float values, so you can use small numbers as well. |
maxdatavalue | For limited turn KNOBs, this is the value, which is assigned to the Knob, when it reaches the rightboundaryangle. |
destvar |
This is the PREFIX for the variable, which holds the status of the KNOB. The KNOB widgets sets/updates the following variables, when it get turned:
|
roundpos |
The position in digits, the [PREFIX]_value should be rounded. Examples: If the [PREFIX]_value is 10.623:
|
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. |
If you want to set the position of the KNOB (The Knob Picture) , meaningful for limited turn KNOBs only, you have to set [PREFIX]_value and the call the updatewidget action.