Fixed issues with new cursor modes.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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());
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user