aboutsummaryrefslogtreecommitdiffhomepage
path: root/desktop/sources/scripts/lib/controller.js
diff options
context:
space:
mode:
authorDevine Lu Linvega <[email protected]>2019-04-15 09:15:48 +0900
committerDevine Lu Linvega <[email protected]>2019-04-15 09:15:48 +0900
commitc76707358b0819bcd213bb0da2bd680edf35f3e1 (patch)
tree8ab22f91a18234fdcf9f366d289886edd313f545 /desktop/sources/scripts/lib/controller.js
parentf676fbc8be18cd3c61fdca90904054ee65f596cc (diff)
downloadOrca-c76707358b0819bcd213bb0da2bd680edf35f3e1.tar.gz
Orca-c76707358b0819bcd213bb0da2bd680edf35f3e1.zip
Rebuilt Midi input/outputs
Diffstat (limited to 'desktop/sources/scripts/lib/controller.js')
-rw-r--r--desktop/sources/scripts/lib/controller.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/desktop/sources/scripts/lib/controller.js b/desktop/sources/scripts/lib/controller.js
index 3140e49..cc6dfef 100644
--- a/desktop/sources/scripts/lib/controller.js
+++ b/desktop/sources/scripts/lib/controller.js
@@ -24,6 +24,12 @@ function Controller () {
this.menu[mode][cat][label] = { role: label }
}
+ this.addSpacer = function (mode, cat, label, type = 'separator') {
+ if (!this.menu[mode]) { this.menu[mode] = {} }
+ if (!this.menu[mode][cat]) { this.menu[mode][cat] = {} }
+ this.menu[mode][cat][label] = { type: type }
+ }
+
this.clearCat = function (mode, cat) {
if (this.menu[mode]) { this.menu[mode][cat] = {} }
}
@@ -42,6 +48,8 @@ function Controller () {
const option = m[cat][name]
if (option.role) {
submenu.push({ role: option.role })
+ } else if (option.type) {
+ submenu.push({ type: option.type })
} else {
submenu.push({ label: name, accelerator: option.accelerator, click: option.fn })
}