Improved commander.
This commit is contained in:
parent
d9673d2121
commit
747ecc24c6
@ -45,6 +45,7 @@ $ ! ; Clear temporary storage
|
||||
```
|
||||
+ M10 10 h 80 v 80 h -80 Z ; Draw a square outline
|
||||
+ M10 80 C 40 10, 65 10, 95 80 S 150 150, 180 80 ; Draw a bezier
|
||||
+ M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 ; Draw a circle
|
||||
```
|
||||
|
||||
##Stroke*
|
||||
|
@ -67,6 +67,7 @@ function Commander(element,element_input)
|
||||
var key = content[0];
|
||||
content.shift();
|
||||
this.cmd = new Command(content);
|
||||
ronin.module = null;
|
||||
|
||||
switch(key) {
|
||||
case "@":
|
||||
|
@ -6,6 +6,14 @@ function Hint(element)
|
||||
|
||||
this.update = function()
|
||||
{
|
||||
this.element.innerHTML = !ronin.module ? "Missing" : ronin.module.hint(commander.cmd);
|
||||
if(ronin.module){
|
||||
this.element.innerHTML = ronin.module.hint(commander.cmd);
|
||||
this.element.style.display = "block";
|
||||
}
|
||||
else{
|
||||
this.element.style.display = "none";
|
||||
}
|
||||
|
||||
console.log(ronin.module);
|
||||
}
|
||||
}
|
@ -24,7 +24,4 @@ function Vector()
|
||||
{
|
||||
return "Vector: "
|
||||
}
|
||||
|
||||
// Demo:
|
||||
// > 5 #ff0000;+ M10 80 C 40 10, 65 10, 95 80 S 150 150, 180 80
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user