Added eraser.
This commit is contained in:
@@ -7,7 +7,7 @@ function Cursor()
|
||||
{
|
||||
if(event.ctrlKey === true){ this.set_mode(ronin.overlay); }
|
||||
else if(event.altKey === true){ this.set_mode(ronin.canvas); }
|
||||
else if(event.shiftKey === true){ this.set_mode(ronin.brush); }
|
||||
else if(event.shiftKey === true){ this.set_mode(ronin.eraser); }
|
||||
else{ this.set_mode(ronin.brush); }
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ function Ronin()
|
||||
this.vector = new Vector("+");
|
||||
this.help = new Help("?");
|
||||
this.history = new History("^");
|
||||
this.eraser = new Eraser(".");
|
||||
|
||||
this.cursor = new Cursor();
|
||||
|
||||
@@ -28,6 +29,7 @@ function Ronin()
|
||||
this.modules[this.vector.rune] = this.vector;
|
||||
this.modules[this.help.rune] = this.help;
|
||||
this.modules[this.history.rune] = this.history;
|
||||
this.modules[this.eraser.rune] = this.eraser;
|
||||
|
||||
this.cursors = [];
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ function Widget()
|
||||
s += ronin.modules[key].widget();
|
||||
}
|
||||
|
||||
s += "<span class='cursor'>"+ronin.cursor.mode.constructor.name+"</span>";
|
||||
s += "<span class='cursor'>"+ronin.cursor.mode.widget_cursor()+"</span>";
|
||||
|
||||
this.element.innerHTML = s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user