function Help(rune) { Module.call(this,rune); this.view = document.createElement("div"); this.install = function(cmd) { console.log("Installing "+ronin.modules[this.rune].constructor.name); this.view.setAttribute("id","help_view"); var html = ""; html += ""; html += this.view_controls(); html += this.view_modules(); html += this.view_units(); html += this.view_presets(); this.view.innerHTML = "
"+html+"
"; ronin.element.appendChild(this.view); } this.on_resize = function() { this.view.style.left = (window.innerWidth/2)-(ronin.surface.size.width/2); this.view.style.top = (window.innerHeight/2)+(ronin.surface.size.height/2)+20; } this.passive = function(cmd) { this.view.style.display = "block"; ronin.cursor.element.style.display = "none"; } this.key_escape = function() { this.view.style.display = "none"; } // this.view_controls = function() { html = "

Controls

"; html += ""; return "
"+html+"
"; } this.view_modules = function() { html = "

Modules

"; html += ""; html += "\n"; return "
"+html+"
"; } this.view_units = function() { html = "

Units

\n\n"; html += ""; html += "\n"; html += "

Filters

\n\n"; html += ""; html += "\n"; return "
"+html+"
"; } this.view_presets = function() { html = "

Presets

\n\n"; for(var key in ronin.modules["-"].collection){ html += "

"+key+"

\n"; } return "
"+html+"
"; } function pad(s,length) { if(!s){ return s; } var new_string = s; while(new_string.length < length){ new_string += " "; } return new_string; } }