mse.mscript and mse.console for mscript editor features.
This commit is contained in:
parent
a6becef4cc
commit
749719e477
|
@ -2493,6 +2493,7 @@ const seq = require('./lib/ui/seq.js');
|
|||
const cmd = require('./lib/ui/cmd.js');
|
||||
const log = require('./lib/ui/log.js');
|
||||
const devices = require('./lib/ui/devices.js');
|
||||
const mse = require('./lib/ui/mscript.js');
|
||||
const mscript = require('./lib/mscript');
|
||||
|
||||
|
||||
|
@ -2539,8 +2540,8 @@ function init () {
|
|||
'use strict';
|
||||
nav.init();
|
||||
gui.grid.init();
|
||||
gui.mscript.init();
|
||||
gui.console.init();
|
||||
mse.mscript.init();
|
||||
mse.console.init();
|
||||
log.init();
|
||||
devices.init();
|
||||
light.init();
|
||||
|
|
|
@ -39,6 +39,7 @@ mse.mscript.eval = function () {
|
|||
const data = mse.mscript.editor.getValue();
|
||||
const output = mscript.interpret(data, function (output) {
|
||||
console.dir(output);
|
||||
mse.console.print(JSON.stringify(output, null, '\t'))
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -88,4 +89,12 @@ mse.console.newLine = function () {
|
|||
mse.console.elem.val(current);
|
||||
};
|
||||
|
||||
module.exports = mse
|
||||
mse.console.print = function (str) {
|
||||
'use strict'
|
||||
let current = mse.console.elem.val();
|
||||
current += '> ';
|
||||
current += str;
|
||||
mse.console.elem.val(current);
|
||||
};
|
||||
|
||||
module.exports = mse;
|
|
@ -34,7 +34,7 @@ nav.change = function (id) {
|
|||
light.rgb.set(light.color);
|
||||
}
|
||||
} else if (id === 'script') {
|
||||
gui.mscript.open();
|
||||
mse.mscript.open();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue