Don't remove 'button' argument from onMouseMove for now (wait until a new point release?)

This commit is contained in:
Joshua Granick
2015-03-26 02:23:13 -07:00
parent 6d8c9458fe
commit ce576121fc
5 changed files with 16 additions and 12 deletions

View File

@@ -185,8 +185,8 @@ class NativeApplication {
case MOUSE_MOVE:
parent.window.onMouseMove.dispatch (mouseEventInfo.x, mouseEventInfo.y);
parent.window.onMouseMoveRelative.dispatch (mouseEventInfo.movementX, mouseEventInfo.movementY);
parent.window.onMouseMove.dispatch (mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button);
parent.window.onMouseMoveRelative.dispatch (mouseEventInfo.movementX, mouseEventInfo.movementY, mouseEventInfo.button);
case MOUSE_WHEEL:

View File

@@ -261,22 +261,22 @@ class Application extends Module {
}
public override function onMouseMove (x:Float, y:Float):Void {
public override function onMouseMove (x:Float, y:Float, button:Int):Void {
for (module in modules) {
module.onMouseMove (x, y);
module.onMouseMove (x, y, button);
}
}
public override function onMouseMoveRelative (x:Float, y:Float):Void {
public override function onMouseMoveRelative (x:Float, y:Float, button:Int):Void {
for (module in modules) {
module.onMouseMoveRelative (x, y);
module.onMouseMoveRelative (x, y, button);
}

View File

@@ -89,16 +89,18 @@ interface IModule {
* Called when a mouse move event is fired
* @param x The current x coordinate of the mouse
* @param y The current y coordinate of the mouse
* @param button The ID of the mouse button that was pressed
*/
public function onMouseMove (x:Float, y:Float):Void;
public function onMouseMove (x:Float, y:Float, button:Int):Void;
/**
* Called when a mouse move relative event is fired
* @param x The x movement of the mouse
* @param y The y movement of the mouse
* @param button The ID of the mouse button that was pressed
*/
public function onMouseMoveRelative (x:Float, y:Float):Void;
public function onMouseMoveRelative (x:Float, y:Float, button:Int):Void;
/**

View File

@@ -64,16 +64,18 @@ class Module implements IModule {
* Called when a mouse move event is fired
* @param x The current x coordinate of the mouse
* @param y The current y coordinate of the mouse
* @param button The ID of the mouse button that was pressed
*/
public function onMouseMove (x:Float, y:Float):Void { }
public function onMouseMove (x:Float, y:Float, button:Int):Void { }
/**
* Called when a mouse move relative event is fired
* @param x The x movement of the mouse
* @param y The y movement of the mouse
* @param button The ID of the mouse button that was pressed
*/
public function onMouseMoveRelative (x:Float, y:Float):Void { }
public function onMouseMoveRelative (x:Float, y:Float, button:Int):Void { }
/**

View File

@@ -24,8 +24,8 @@ class Window {
public var onKeyDown = new Event<KeyCode->KeyModifier->Void> ();
public var onKeyUp = new Event<KeyCode->KeyModifier->Void> ();
public var onMouseDown = new Event<Float->Float->Int->Void> ();
public var onMouseMove = new Event<Float->Float->Void> ();
public var onMouseMoveRelative = new Event<Float->Float->Void> ();
public var onMouseMove = new Event<Float->Float->Int->Void> ();
public var onMouseMoveRelative = new Event<Float->Float->Int->Void> ();
public var onMouseUp = new Event<Float->Float->Int->Void> ();
public var onMouseWheel = new Event<Float->Float->Void> ();
public var onTouchEnd = new Event<Float->Float->Int->Void> ();