From ce576121fcb4599c927b414f49cd2f5005dd3f9f Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Thu, 26 Mar 2015 02:23:13 -0700 Subject: [PATCH] Don't remove 'button' argument from onMouseMove for now (wait until a new point release?) --- lime/_backend/native/NativeApplication.hx | 4 ++-- lime/app/Application.hx | 8 ++++---- lime/app/IModule.hx | 6 ++++-- lime/app/Module.hx | 6 ++++-- lime/ui/Window.hx | 4 ++-- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lime/_backend/native/NativeApplication.hx b/lime/_backend/native/NativeApplication.hx index 4ab68db87..bb8c25fc8 100644 --- a/lime/_backend/native/NativeApplication.hx +++ b/lime/_backend/native/NativeApplication.hx @@ -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: diff --git a/lime/app/Application.hx b/lime/app/Application.hx index 90d455be0..a6299c1d7 100644 --- a/lime/app/Application.hx +++ b/lime/app/Application.hx @@ -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); } diff --git a/lime/app/IModule.hx b/lime/app/IModule.hx index 363d2193a..85cd4dab6 100644 --- a/lime/app/IModule.hx +++ b/lime/app/IModule.hx @@ -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; /** diff --git a/lime/app/Module.hx b/lime/app/Module.hx index dee7b76b7..5de0d05a6 100644 --- a/lime/app/Module.hx +++ b/lime/app/Module.hx @@ -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 { } /** diff --git a/lime/ui/Window.hx b/lime/ui/Window.hx index efb4b3dd0..d865145c1 100644 --- a/lime/ui/Window.hx +++ b/lime/ui/Window.hx @@ -24,8 +24,8 @@ class Window { public var onKeyDown = new EventKeyModifier->Void> (); public var onKeyUp = new EventKeyModifier->Void> (); public var onMouseDown = new EventFloat->Int->Void> (); - public var onMouseMove = new EventFloat->Void> (); - public var onMouseMoveRelative = new EventFloat->Void> (); + public var onMouseMove = new EventFloat->Int->Void> (); + public var onMouseMoveRelative = new EventFloat->Int->Void> (); public var onMouseUp = new EventFloat->Int->Void> (); public var onMouseWheel = new EventFloat->Void> (); public var onTouchEnd = new EventFloat->Int->Void> ();