diff --git a/browser/scss/style.scss b/browser/scss/style.scss index ed0683e2..e2e9e482 100644 --- a/browser/scss/style.scss +++ b/browser/scss/style.scss @@ -1176,7 +1176,7 @@ a { } -/* Multiple buttons matrix */ +/* Multiple widgets (push|toggle|fader) matrix */ .multitoggle-container, .multipush-container, .multifader-container { height:200rem; width:200rem; diff --git a/examples/widgets.js b/examples/widgets.js index 2cbe7c9c..57912430 100644 --- a/examples/widgets.js +++ b/examples/widgets.js @@ -1589,5 +1589,67 @@ ] } ] + }, + { + "label": "Unnamed", + "widgets": [ + { + "type": "multifader", + "id": "multifader_1", + "strips": "12", + "label": "multifader_1", + "unit": "", + "left": "0", + "top": "auto", + "width": "100%", + "height": "50%", + "css": "", + "range": { + "min": 0, + "max": 1 + }, + "precision": 2, + "path": "/multifader_1", + "target": [] + }, + { + "type": "multipush", + "id": "multipush_1", + "matrix": [ + 6, + 6 + ], + "label": "multipush_1", + "left": "0", + "top": "50%", + "width": "50%", + "height": "50%", + "css": "", + "on": 1, + "off": 0, + "precision": 2, + "path": "/multipush_1", + "target": [] + }, + { + "type": "multitoggle", + "id": "multitoggle_1", + "matrix": [ + 6, + 6 + ], + "label": "multipush_1", + "left": "50%", + "top": "50%", + "width": "50%", + "height": "50%", + "css": "", + "on": 1, + "off": 0, + "precision": 2, + "path": "/multipush_1", + "target": [] + } + ] } -] +] \ No newline at end of file diff --git a/package.json b/package.json index 39d221eb..66b48491 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "open-stage-control", "productName": "Open Stage Control", "description": "A libre desktop OSC bi-directionnal control surface application.", - "version": "0.2.1", + "version": "0.3.0", "main": "index.js", "author": { "name": "Jean-Emmanuel Doucet / AMMD", diff --git a/resources/docs/widgets-reference.md b/resources/docs/widgets-reference.md index 16e26488..bf5081dc 100644 --- a/resources/docs/widgets-reference.md +++ b/resources/docs/widgets-reference.md @@ -52,6 +52,23 @@ unit: false, // [string] value suffix absolute:false // [bool] set to true for absolute value on touch/click instead of relative dragging ``` +### multifader +```js +type:'multifader', +strips:2, // [integer] number of faders +range: {"min":0,"max":1}, // [object] defining the breakpoints of the fader + // keys can be percentages or 'min' / 'max' +unit: false, // [string] value suffix +absolute:false // [bool] set to true for absolute value on touch/click instead of relative dragging +``` +*This creates a row of vertical faders that respond to the same gesture. Each of these faders will receive its parent's properties and the following (where X is the fader's index in the row) :* +```js +id:PARENT_ID_X, +label: X, +path: PARENT_PATH/X +``` + + ### knob ```js type:'knob', @@ -93,6 +110,20 @@ on: 1, // [string|number|false] value sent when toggle is o off:0, // [string|number|false] value sent when toggle is off (false to prevent sending ) ``` +### multitoggle +```js +type:'multitoggle', +matrix:[2,2], // [array] [number of columns, number of rows] +on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending ) +off:0, // [string|number|false] value sent when toggle is off (false to prevent sending ) +``` +*This creates a matrix of toggles that respond to the same gesture. Each of these toggles will receive its parent's properties and the following (where X is the toggle's index in the row) :* +```js +id:PARENT_ID_X, +label: X, +path: PARENT_PATH/X +``` + ### push ```js type:'push', @@ -100,6 +131,20 @@ on: 1, // [string|number|false] value sent when toggle is o off:0, // [string|number|false] value sent when toggle is off (false to prevent sending ) ``` +### multipush +```js +type:'multipush', +matrix:[2,2], // [array] [number of columns, number of rows] +on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending ) +off:0, // [string|number|false] value sent when toggle is off (false to prevent sending ) +``` +*This creates a matrix of push buttons that respond to the same gesture. Each of these buttons will receive its parent's properties and the following (where X is the button's index in the row) :* +```js +id:PARENT_ID_X, +label: X, +path: PARENT_PATH/X +``` + ### switch ```js type:'switch',