Pretty solid build
This commit is contained in:
@@ -22,10 +22,8 @@ function Commander()
|
||||
for(setting_id in q.settings){
|
||||
var setting_value = q.settings[setting_id];
|
||||
if(!ronin.modules[q.module].settings[setting_id]){ console.log("Missing setting",setting_id); return; }
|
||||
|
||||
ronin.modules[q.module].settings[setting_id] = setting_value;
|
||||
}
|
||||
|
||||
ronin.modules[q.module].routes = q.routes;
|
||||
|
||||
// Run methods
|
||||
@@ -80,12 +78,7 @@ function Commander()
|
||||
{
|
||||
var target_module = ronin.commander.query().module;
|
||||
|
||||
if(ronin.modules[target_module]){
|
||||
var ac = ronin.hint.find_autocomplete(ronin.modules[target_module].methods,":");
|
||||
}
|
||||
else{
|
||||
var ac = ronin.hint.find_autocomplete(ronin.modules," ");
|
||||
}
|
||||
var ac = ronin.modules[target_module] ? ronin.hint.find_autocomplete(ronin.modules[target_module].methods,":") : ronin.hint.find_autocomplete(ronin.modules," ")
|
||||
|
||||
if(ac.lenght < 1 || !ac[0]){ return; }
|
||||
|
||||
|
||||
@@ -13,14 +13,6 @@ function Docs()
|
||||
html += this.print_modules(ronin.modules);
|
||||
html += this.print_license();
|
||||
|
||||
// dialog.showSaveDialog((fileName) => {
|
||||
// if (fileName === undefined){ return; }
|
||||
// console.log(fileName)
|
||||
// fs.writeFile(fileName, html, (err) => {
|
||||
// if(err){ alert("An error ocurred creating the file "+ err.message); return; }
|
||||
// });
|
||||
// });
|
||||
|
||||
fs.writeFile("/Users/VillaMoirai/Github/HundredRabbits/Ronin/README.md", html, (err) => {
|
||||
if(err){ alert("An error ocurred creating the file "+ err.message); return; }
|
||||
});
|
||||
@@ -46,7 +38,6 @@ function Docs()
|
||||
html += module.docs+"\n\n";
|
||||
html += this.print_methods(module.methods)+"\n";
|
||||
html += this.print_settings(module.settings)+"\n";
|
||||
html += this.print_ports(module.ports)+"\n";
|
||||
}
|
||||
return html+"\n";
|
||||
}
|
||||
@@ -73,18 +64,6 @@ function Docs()
|
||||
return html;
|
||||
}
|
||||
|
||||
|
||||
this.print_ports = function(ports)
|
||||
{
|
||||
var html = "### Ports\n";
|
||||
|
||||
for(port_name in ports){
|
||||
var port = ports[port_name];
|
||||
html += "- `"+(port.input ? '->' : '')+""+port.name+""+(port.output ? '->' : '')+"` **("+port.value+"/"+port.max+")** "+port.docs+".\n";
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
this.print_license = function()
|
||||
{
|
||||
html = "## License\n";
|
||||
|
||||
@@ -9,7 +9,7 @@ function Hint()
|
||||
{
|
||||
ronin.commander.el.appendChild(this.el);
|
||||
ronin.commander.el.appendChild(this.cursor_hint_el);
|
||||
this.cursor_hint_el.innerHTML = "Hello";
|
||||
this.cursor_hint_el.innerHTML = "";
|
||||
}
|
||||
|
||||
this.find_autocomplete = function(collection,append = "")
|
||||
|
||||
@@ -18,6 +18,7 @@ function Keyboard()
|
||||
ronin.commander.input_el.value = "";
|
||||
ronin.guide.update();
|
||||
ronin.guide.clear();
|
||||
ronin.guide.inspect = false;
|
||||
ronin.preview.clear();
|
||||
}
|
||||
|
||||
@@ -38,6 +39,8 @@ function Keyboard()
|
||||
|
||||
if(e.key == "n" && (e.ctrlKey || e.metaKey)){
|
||||
e.preventDefault();
|
||||
ronin.guide.inspect = false;
|
||||
ronin.guide.clear();
|
||||
ronin.render.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ function Guide()
|
||||
Layer.call(this);
|
||||
|
||||
this.el.id = "guide";
|
||||
this.inspect = true;
|
||||
this.inspect = false;
|
||||
|
||||
this.update = function()
|
||||
{
|
||||
@@ -16,6 +16,10 @@ function Guide()
|
||||
|
||||
var units = this.find_units();
|
||||
|
||||
if(this.inspect){
|
||||
this.draw_inspector();
|
||||
}
|
||||
|
||||
if(units.length == 0){ return; }
|
||||
|
||||
for(i in units){
|
||||
@@ -32,9 +36,6 @@ function Guide()
|
||||
this.draw_rect(u);
|
||||
this.draw_pos({x:u.x + (u.width/2),y:u.y + (u.height/2)});
|
||||
}
|
||||
if(this.inspect){
|
||||
this.draw_inspector();
|
||||
}
|
||||
}
|
||||
|
||||
this.draw_rect = function(u)
|
||||
@@ -128,7 +129,6 @@ function Guide()
|
||||
|
||||
this.draw_inspector = function()
|
||||
{
|
||||
//
|
||||
this.draw_line({x:ronin.frame.width/2,y:0},{x:ronin.frame.width/2,y:ronin.frame.height},"red");
|
||||
this.draw_line({x:0,y:ronin.frame.height/2},{x:ronin.frame.width,y:ronin.frame.height/2},"red");
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ function Brush()
|
||||
{
|
||||
Module.call(this,"brush");
|
||||
|
||||
this.settings = {size:4,color:"#000",opacity:1.0};
|
||||
this.settings = {size:4,color:"#000"};
|
||||
|
||||
this.pointers = [
|
||||
new Pointer({offset:{x:0,y:0}}),
|
||||
|
||||
@@ -42,8 +42,8 @@ function Frame()
|
||||
});
|
||||
|
||||
this.methods.inspect = new Method("inspect","","View canvas details",function(q){
|
||||
ronin.layers.guide.inspect = ronin.layers.guide.inspect ? false : true;
|
||||
ronin.layers.guide.draw();
|
||||
ronin.guide.inspect = ronin.guide.inspect ? false : true;
|
||||
ronin.guide.draw();
|
||||
});
|
||||
|
||||
this.resize_to = function(size)
|
||||
|
||||
Reference in New Issue
Block a user