Sorting out the cursor functionalities.
This commit is contained in:
21
scripts/modes/mode.drag.js
Normal file
21
scripts/modes/mode.drag.js
Normal file
@@ -0,0 +1,21 @@
|
||||
function Mode_Drag()
|
||||
{
|
||||
Mode.call(this);
|
||||
|
||||
this.name = "Drag";
|
||||
|
||||
this.mouse_down = function(event)
|
||||
{
|
||||
ronin.drag_start(event); ronin.drag(event);
|
||||
}
|
||||
|
||||
this.mouse_move = function(event)
|
||||
{
|
||||
ronin.drag(event);
|
||||
}
|
||||
|
||||
this.mouse_up = function(event)
|
||||
{
|
||||
ronin.drag_stop(event);
|
||||
}
|
||||
}
|
||||
21
scripts/modes/mode.guide.js
Normal file
21
scripts/modes/mode.guide.js
Normal file
@@ -0,0 +1,21 @@
|
||||
function Mode_Guide()
|
||||
{
|
||||
Mode.call(this);
|
||||
|
||||
this.name = "Guide";
|
||||
|
||||
this.mouse_down = function(event)
|
||||
{
|
||||
ronin.overlay.live_draw_start(event);
|
||||
}
|
||||
|
||||
this.mouse_move = function(event)
|
||||
{
|
||||
ronin.overlay.live_draw(event);
|
||||
}
|
||||
|
||||
this.mouse_up = function(event)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
24
scripts/modes/mode.js
Normal file
24
scripts/modes/mode.js
Normal file
@@ -0,0 +1,24 @@
|
||||
function Mode()
|
||||
{
|
||||
this.name = "Unknown";
|
||||
|
||||
this.widget = function()
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
|
||||
this.mouse_down = function(event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
this.mouse_move = function(event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
this.mouse_up = function(event)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
21
scripts/modes/mode.paint.js
Normal file
21
scripts/modes/mode.paint.js
Normal file
@@ -0,0 +1,21 @@
|
||||
function Mode_Paint()
|
||||
{
|
||||
Mode.call(this);
|
||||
|
||||
this.name = "Paint";
|
||||
|
||||
this.mouse_down = function(event)
|
||||
{
|
||||
ronin.brush.draw_start(event); ronin.brush.draw(event);
|
||||
}
|
||||
|
||||
this.mouse_move = function(event)
|
||||
{
|
||||
ronin.brush.draw(event);
|
||||
}
|
||||
|
||||
this.mouse_up = function(event)
|
||||
{
|
||||
ronin.brush.draw_stop(event);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user