diff --git a/scripts/core/ronin.js b/scripts/core/ronin.js index cb2b7d8..7f1a622 100644 --- a/scripts/core/ronin.js +++ b/scripts/core/ronin.js @@ -83,6 +83,7 @@ function Ronin() this.on_resize = function() { + ronin.frame.center(); } this.on_drag = function() diff --git a/scripts/modules/frame.js b/scripts/modules/frame.js index 1b8af65..0a8abac 100644 --- a/scripts/modules/frame.js +++ b/scripts/modules/frame.js @@ -88,6 +88,12 @@ function Frame(rune) setTimeout(function(){ ronin.frame.blink(); }, 30); } + this.center = function() + { + ronin.frame.element.style.left = (window.innerWidth/2) - (ronin.frame.element.width/4); + ronin.frame.element.style.top = (window.innerHeight/2) - (ronin.frame.element.height/4) - 30; + } + this.select_layer = function(layer) { this.active_layer = layer;