Improved design

This commit is contained in:
Devine Lu Linvega
2017-01-16 21:01:27 -07:00
parent 215cbfdd29
commit 8b963e6283
14 changed files with 54 additions and 27 deletions

View File

@@ -25,7 +25,7 @@ document.onkeydown = function myFunction(){ keyboard.listen_onkeydown(event); };
// Canvas
var starting_canvas = new Rect();
starting_canvas.width = window.innerWidth - 200;
starting_canvas.height = window.innerHeight - 200;
starting_canvas.height = window.innerHeight - 400;
// Clamp
@@ -35,8 +35,8 @@ starting_canvas.height = parseInt(starting_canvas.height/40) * 40;
commander.query("~ "+ronin.timestamp());
commander.query("# "+starting_canvas.render());
commander.query("# layer=background");
commander.query("# #efefef");
// commander.query("# #efefef");
commander.query("# layer=main");
commander.query("> 1 0,0 #000000");
commander.query("> 1 1,0 #000000");
commander.query("> 1 0,1 #000000");
commander.query("> 1 0,0 #ff0000");
commander.query("> 1 1,0 #ff0000");
commander.query("> 1 0,1 #ff0000");

View File

@@ -33,6 +33,14 @@ function Ronin()
this.modules[this.stroke.rune] = this.stroke;
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.cursors = [];

View File

@@ -18,7 +18,7 @@ function Widget()
this.on_resize = function()
{
this.element.style.left = (window.innerWidth/2)-(ronin.surface.size.width/2);
this.element.style.top = (window.innerHeight/2)+(ronin.surface.size.height/2);
this.element.style.top = (window.innerHeight/2)+(ronin.surface.size.height/2)+20;
this.element.style.width = ronin.surface.size.width+"px";
this.update();