diff options
author | Devine Lu Linvega <[email protected]> | 2019-04-15 09:15:48 +0900 |
---|---|---|
committer | Devine Lu Linvega <[email protected]> | 2019-04-15 09:15:48 +0900 |
commit | c76707358b0819bcd213bb0da2bd680edf35f3e1 (patch) | |
tree | 8ab22f91a18234fdcf9f366d289886edd313f545 /desktop/sources/scripts/lib/controller.js | |
parent | f676fbc8be18cd3c61fdca90904054ee65f596cc (diff) | |
download | Orca-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.js | 8 |
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 }) } |