docs: updateref

This commit is contained in:
jean-emmanuel 2022-10-19 11:09:02 +02:00
parent 919678fea9
commit 35e593be37

View file

@ -98,15 +98,14 @@
| --- | --- | --- | --- |
| <h6 id="button_on">on<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#button_on" title="Permanent link">#</a></h6> | `*` | <code>1</code> | Set to `null` to send send no argument in the osc message. Ignored if `mode` is `momentary`. |
| <h6 id="button_off">off<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#button_off" title="Permanent link">#</a></h6> | `*` | <code>0</code> | Set to `null` to send send no argument in the osc message. Must be different from `on`. Ignored if `mode` is `momentary` or `tap`. |
| <h6 id="button_mode">mode<a class="headerlink" href="#button_mode" title="Permanent link">#</a></h6> | `string` | <code>"toggle"</code> | Interaction mode:<br/>- `toggle` (classic on/off switch)<br/>- `push` (press & release)<br/>- `momentary` (no release, no value sent with the address)<br/>- `tap` (no release, sends `on` as value)<br/><br/>Choices: `toggle`, `push`, `momentary`, `tap` |
| <h6 id="button_decoupled">decoupled<a class="headerlink" href="#button_decoupled" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | 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.<br/><br/>From a script property this kind of message can be simulated with:<br/><br/>`set("widget_id", value, {external: true})` |
| <h6 id="button_mode">mode<a class="headerlink" href="#button_mode" title="Permanent link">#</a></h6> | `string` | <code>"toggle"</code> | Interaction mode:<br/>- `toggle` (classic on/off switch)<br/>- `push` (press & release)<br/>- `momentary` (no release, no value sent with the address)<br/>- `tap` (no release, sends `on` as value)<br/>- `decoupled (toggle mode that only updates its state when it receives a value from an osc/midi message*)`<br/><br/>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.<br/><br/>From a script property, feedback messages can be simulated with:<br/><br/>`set("widget_id", value, {external: true})`<br/><br/>Choices: `toggle`, `push`, `momentary`, `tap`, `decoupled` |
| <h6 id="button_doubleTap">doubleTap<a class="headerlink" href="#button_doubleTap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to make the button require a double tap to be pushed instead of a single tap |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="button_onValue">onValue<a class="headerlink" href="#button_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Additional variables:<br/>- `locals.touchCoords`: `[x, y]` array representing the touch coordinates, normalized between 0 and 1. |
| <h6 id="button_onValue">onValue<a class="headerlink" href="#button_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Additional variables:<br/>- `locals.touchCoords`: `[x, y]` array representing the touch coordinates, normalized between 0 and 1.<br/>- `locals.external`: `true` if value was received from an osc/midi message, `false otherwise`. |
??? api "<div id="switch">switch<a class="headerlink" href="#switch" title="Permanent link">#</a></div>"
Value selector button.