diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index ab104d37..5158dd11 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -98,15 +98,14 @@ | --- | --- | --- | --- | |
on#
| `*` | 1 | Set to `null` to send send no argument in the osc message. Ignored if `mode` is `momentary`. | |
off#
| `*` | 0 | Set to `null` to send send no argument in the osc message. Must be different from `on`. Ignored if `mode` is `momentary` or `tap`. | - |
mode#
| `string` | "toggle" | Interaction mode:
- `toggle` (classic on/off switch)
- `push` (press & release)
- `momentary` (no release, no value sent with the address)
- `tap` (no release, sends `on` as value)

Choices: `toggle`, `push`, `momentary`, `tap` | - |
decoupled#
| `boolean` | false | If `true`, the button's visual state will not change unless it receives a value that matches `on` or `off` coming from an osc/midi message.

From a script property this kind of message can be simulated with:

`set("widget_id", value, {external: true})` | + |
mode#
| `string` | "toggle" | Interaction mode:
- `toggle` (classic on/off switch)
- `push` (press & release)
- `momentary` (no release, no value sent with the address)
- `tap` (no release, sends `on` as value)
- `decoupled (toggle mode that only updates its state when it receives a value from an osc/midi message*)`

When `decoupled`, the button's value is ambiguous: when clicked, it will send the value that's requested, otherwise it will return the value received from the feedback message.

From a script property, feedback messages can be simulated with:

`set("widget_id", value, {external: true})`

Choices: `toggle`, `push`, `momentary`, `tap`, `decoupled` | |
doubleTap#
| `boolean` | false | Set to `true` to make the button require a double tap to be pushed instead of a single tap | === "scripting" | property | type |default | description | | --- | --- | --- | --- | - |
onValue#
| `script` | "" | Script executed when the widget's value updates. See documentation.

Additional variables:
- `locals.touchCoords`: `[x, y]` array representing the touch coordinates, normalized between 0 and 1. | + |
onValue#
| `script` | "" | Script executed when the widget's value updates. See documentation.

Additional variables:
- `locals.touchCoords`: `[x, y]` array representing the touch coordinates, normalized between 0 and 1.
- `locals.external`: `true` if value was received from an osc/midi message, `false otherwise`. | ??? api "
switch#
" Value selector button.