Add script and console tabs

This commit is contained in:
luboslenco
2020-01-20 21:01:12 +01:00
parent 6d786f5d46
commit 4117ed2c3e
9 changed files with 126 additions and 33 deletions
-19
View File
@@ -1,19 +0,0 @@
let plugin = new arm.Plugin();
let h1 = new zui.Handle();
let h2 = new zui.Handle();
plugin.drawUI = function(ui) {
if (ui.panel(h1, "Console")) {
ui.indent();
ui.row([8/10, 2/10]);
var t = ui.textInput(h2);
if (ui.button("Run")) {
try { arm.Log.trace("> " + t); eval(t); }
catch(e) { arm.Log.trace(e); }
}
for (const t of arm.Log.lastTraces) ui.text(t);
ui.unindent();
}
}