forked from cory/tildefriends
33 lines
736 B
JavaScript
33 lines
736 B
JavaScript
|
"use strict";
|
||
|
|
||
|
//! {"category": "tests"}
|
||
|
|
||
|
terminal.print("Hello, world!");
|
||
|
terminal.split([
|
||
|
{name: "h1", grow: 4},
|
||
|
{name: "h2", grow: 1},
|
||
|
{type: "vertical", children: [
|
||
|
{name: "h3.v1"},
|
||
|
{name: "h3.v2"},
|
||
|
{type: "horizontal", children: [
|
||
|
{name: "h3.v3.h1"},
|
||
|
{name: "h3.v3.h2"},
|
||
|
{name: "h3.v3.h3"},
|
||
|
]},
|
||
|
{name: "h3.v4"},
|
||
|
]},
|
||
|
{name: "h4"}
|
||
|
]);
|
||
|
|
||
|
function multiprint(text) {
|
||
|
var terminals = ["h1", "h2", "h3.v1", "h3.v2", "h3.v3.h1", "h3.v3.h2", "h3.v3.h3", "h3.v4", "h4"];
|
||
|
for (var i = 0; i < terminals.length; i++) {
|
||
|
terminal.select(terminals[i]);
|
||
|
terminal.print({style: "color: red", value: terminals[i]}, " ", text);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
multiprint("hello");
|
||
|
core.register("onInput", function(input) {
|
||
|
multiprint(input);
|
||
|
});
|