Improved help

This commit is contained in:
Devine Lu Linvega 2017-09-28 15:01:17 +13:00
parent 83b7d32062
commit a51eddeb2f
6 changed files with 18 additions and 6 deletions

View File

@ -15,9 +15,20 @@ function Hint()
for(module_id in ronin.modules){
var module = ronin.modules[module_id];
html += module.hint()+" ";
html += module_id+" ";
}
var target_module = ronin.commander.query().module;
if(ronin.commander.input_el.value == ""){
this.el.innerHTML = html;
}
else if(ronin.modules[target_module]){
this.el.innerHTML = this.pad(ronin.commander.input_el.value)+ronin.modules[target_module].hint();
}
else{
this.el.innerHTML = this.pad(ronin.commander.input_el.value)+" > Idle."
}
this.el.innerHTML = this.pad(ronin.commander.input_el.value)+(ronin.commander.input_el.value == "" ? html : "");
}
this.pad = function(input)

View File

@ -1,6 +1,6 @@
function Frame()
{
Module.call(this,"frame");
Module.call(this,"frame","Manager for the canvas size");
this.settings = {width:400,height:400};

View File

@ -1,6 +1,6 @@
function IO()
{
Module.call(this,"io");
Module.call(this,"io","File import/export tools.");
this.settings = {anchor:{x:0,y:0,width:0,height:0}};

View File

@ -1,6 +1,6 @@
function Magnet()
{
Module.call(this,"magnet","Cursor magnetisation settings.");
Module.call(this,"magnet","Cursor magnetisation settings, changes are reflected on the grid layer.");
this.settings = {size:0,step:4};

View File

@ -1,6 +1,6 @@
function Path()
{
Module.call(this,"path");
Module.call(this,"path","Trace lines and to draw shapes.");
this.settings = {thickness:30,color:"black",cap:"square"};

View File

@ -73,6 +73,7 @@ function Ronin()
this.guide.update();
this.cursor.update();
this.preview.update();
this.commander.update();
// this.commander.input_el.value = "io import:~/Desktop/test.png anchor=$";
// this.commander.input_el.value = "path stroke:$+";