Improved guides

This commit is contained in:
Devine Lu Linvega
2017-01-17 09:06:20 -07:00
parent a5a9fb3e6f
commit 348943c505
8 changed files with 34 additions and 36 deletions

View File

@@ -30,7 +30,7 @@ function Hint(element)
var s = "<span class='module'>Modules</span>";
for (var key in ronin.modules){
s += "<span> <span class='value'>"+key+"</span> <span class='param'>"+ronin.modules[key].constructor.name.substr(0,2)+" ";
s += "<span> <span class='value'>"+key+"</span> <span class='param'>"+ronin.modules[key].constructor.name+" ";
}
return s;

View File

@@ -1,6 +1,5 @@
var ronin = new Ronin();
ronin.element = document.getElementById('ronin');
ronin.overlay.element = document.getElementById('overlay');
ronin.surface.element = document.getElementById('surface');
ronin.widget.element = document.getElementById('widget');
ronin.cursor.mode = ronin.brush;
@@ -22,6 +21,8 @@ var keyboard = new Keyboard();
document.onkeyup = function myFunction(){ keyboard.listen_onkeyup(event); };
document.onkeydown = function myFunction(){ keyboard.listen_onkeydown(event); };
ronin.install();
// Canvas
var starting_canvas = new Rect();
starting_canvas.width = window.innerWidth - 200;

View File

@@ -34,13 +34,14 @@ function Ronin()
this.modules[this.vector.rune] = this.vector;
this.modules[this.help.rune] = this.help;
// Install
for(var key in this.modules){
this.modules[key].install();
}
//
this.install = function()
{
for(var key in this.modules){
this.modules[key].install();
}
}
this.cursors = [];