Fixed issues with new cursor modes.

This commit is contained in:
Devine Lu Linvega
2016-12-19 15:01:07 -07:00
parent df8d94d3d5
commit cdbd9e9c0b
6 changed files with 23 additions and 41 deletions

View File

@@ -5,10 +5,10 @@ function Cursor()
this.update = function(event)
{
// if(event.ctrlKey === true){ this.set_mode(new Mode_Guide()); }
// else if(event.altKey === true){ this.set_mode(new Mode_Drag()); }
// else if(event.shiftKey === true){ this.set_mode(new Mode_Paint()); }
// else{ this.set_mode(new Mode_Paint()); }
if(event.ctrlKey === true){ this.set_mode(new Mode_Guide()); }
else if(event.altKey === true){ this.set_mode(new Mode_Drag()); }
else if(event.shiftKey === true){ this.set_mode(new Mode_Paint()); }
else{ this.set_mode(new Mode_Paint()); }
}
this.set_mode = function(mode)

View File

@@ -6,6 +6,8 @@ function Hint(element)
this.update = function()
{
return; // TODO
if(ronin.module){
this.element.innerHTML = this.message(ronin.module,commander.cmd);
this.element.style.display = "block";

View File

@@ -23,8 +23,4 @@ var starting_canvas = new Rect();
starting_canvas.width = window.innerWidth - 200;
starting_canvas.height = window.innerHeight - 200;
ronin.canvas.resize(starting_canvas);
ronin.overlay.resize(starting_canvas);
commander.query("@ 200x200");
commander.query("@ "+starting_canvas.render());

View File

@@ -2,24 +2,6 @@ function Keyboard()
{
this.is_locked = false;
this.cmd = function()
{
var val = commander.element_input.value;
if(val.indexOf(";") > 0){
var cmds = val.split(";");
var vals = [];
for (i = 0; i < cmds.length; i++) {
val = cmds[i].replace(/^\s+|\s+$/g, '');
vals.push(val.split(" "));
}
return vals;
}
else{
return [val.split(" ")];
}
}
this.lock = function()
{
this.is_locked = true;