owl-bt
Version:
owl-bt is editor for Behavior trees. It has been inspired by Unreal engine behavior trees in a way, that it supports special node items like decorators and services. This makes trees smaller and much more readable.
32 lines (25 loc) • 887 B
JavaScript
;
(function() {
class CommandPaletteCfg {
constructor() {
this.commands = [];
}
/**
* register context menu action for services
* @param {Object} commandDesc
* @param {String} commandDesc.service - name of the service, that handles the specified command
* @param {String} (optional) commandDesc.name - command title to be displayed
* @param {String} (optional) commandDesc.icon - command icon
* @param {String} (optional) commandDesc.shortcut - keyboard shortcut for the command
* @param {Bool} (optional) commandDesc.allowHotkeyInForms - whether to enable keyboard shortcut in form elements
*/
addCommand(commandDesc) {
this.commands.push(commandDesc);
}
$get() {
return this;
}
}
angular.module('editorApp')
.provider('CommandPaletteCfg', CommandPaletteCfg);
})();