From bf2bac347b1c942de44c7b6052f35580f9a1c427 Mon Sep 17 00:00:00 2001 From: Albul Date: Tue, 12 Jun 2012 11:00:39 +0400 Subject: [PATCH 1/4] readme has been changed --- README.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index e1989ec..3faabab 100644 --- a/README.txt +++ b/README.txt @@ -8,4 +8,5 @@ It is desirable to notify that Covered Software was "Powered by AlternativaPlatf Additional information Instruction "Compilation of Alternativa3D from source codes" you can find on our wiki: -http://wiki.alternativaplatform.com/Compilation_of_Alternativa3D_from_source_codes \ No newline at end of file +http://wiki.alternativaplatform.com/Compilation_of_Alternativa3D_from_source_codes +. \ No newline at end of file From 6bf0b42bb8209011ea8304b5889d9299c417a104 Mon Sep 17 00:00:00 2001 From: Albul Date: Tue, 12 Jun 2012 11:05:49 +0400 Subject: [PATCH 2/4] Add events: RIGHT_CLICK, RIGHT_MOUSE_DOWN, RIGHT_MOUSE_UP, MIDDLE_CLICK, MIDDLE_MOUSE_DOWN, MIDDLE_MOUSE_UP --- README.txt | 3 +- .../engine3d/core/events/MouseEvent3D.as | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 3faabab..e1989ec 100644 --- a/README.txt +++ b/README.txt @@ -8,5 +8,4 @@ It is desirable to notify that Covered Software was "Powered by AlternativaPlatf Additional information Instruction "Compilation of Alternativa3D from source codes" you can find on our wiki: -http://wiki.alternativaplatform.com/Compilation_of_Alternativa3D_from_source_codes -. \ No newline at end of file +http://wiki.alternativaplatform.com/Compilation_of_Alternativa3D_from_source_codes \ No newline at end of file diff --git a/src/alternativa/engine3d/core/events/MouseEvent3D.as b/src/alternativa/engine3d/core/events/MouseEvent3D.as index af5c57a..ce03818 100644 --- a/src/alternativa/engine3d/core/events/MouseEvent3D.as +++ b/src/alternativa/engine3d/core/events/MouseEvent3D.as @@ -46,6 +46,42 @@ package alternativa.engine3d.core.events { */ public static const MOUSE_UP:String = "mouseUp3D"; + /** + * Defines the value of the type property of a rightClick3D event object. + * @eventType rightClick3D + */ + public static const RIGHT_CLICK:String = "rightClick3D"; + + /** + * Defines the value of the type property of a rightMouseDown3D event object. + * @eventType rightMouseDown3D + */ + public static const RIGHT_MOUSE_DOWN:String = "rightMouseDown3D"; + + /** + * Defines the value of the type property of a rightMouseUp3D event object. + * @eventType rightMouseUp3D + */ + public static const RIGHT_MOUSE_UP:String = "rightMouseUp3D"; + + /** + * Defines the value of the type property of a middleClick3D event object. + * @eventType middleClick3D + */ + public static const MIDDLE_CLICK:String = "middleClick3D"; + + /** + * Defines the value of the type property of a middleMouseDown3D event object. + * @eventType middleMouseDown3D + */ + public static const MIDDLE_MOUSE_DOWN:String = "middleMouseDown3D"; + + /** + * Defines the value of the type property of a middleMouseUp event object. + * @eventType middleMouseUp + */ + public static const MIDDLE_MOUSE_UP:String = "middleMouseUp"; + /** * Defines the value of the type property of a mouseOver3D event object. * @eventType mouseOver3D From f021c4e070714e1dde2e9e5058142b19bcc47f24 Mon Sep 17 00:00:00 2001 From: Albul Date: Tue, 12 Jun 2012 11:10:24 +0400 Subject: [PATCH 3/4] Added events for FP 11.2: RIGHT_CLICK, RIGHT_MOUSE_DOWN, RIGHT_MOUSE_UP, MIDDLE_CLICK, MIDDLE_MOUSE_DOWN, MIDDLE_MOUSE_UP --- src/alternativa/engine3d/core/View.as | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/alternativa/engine3d/core/View.as b/src/alternativa/engine3d/core/View.as index 96748ad..bf35f39 100644 --- a/src/alternativa/engine3d/core/View.as +++ b/src/alternativa/engine3d/core/View.as @@ -295,6 +295,10 @@ package alternativa.engine3d.core { // Listeners addEventListener(MouseEvent.MOUSE_DOWN, onMouse); addEventListener(MouseEvent.CLICK, onMouse); + addEventListener(MouseEvent.RIGHT_MOUSE_DOWN, onMouse); + addEventListener(MouseEvent.RIGHT_CLICK, onMouse); + addEventListener(MouseEvent.MIDDLE_MOUSE_DOWN, onMouse); + addEventListener(MouseEvent.MIDDLE_CLICK, onMouse); addEventListener(MouseEvent.DOUBLE_CLICK, onMouse); addEventListener(MouseEvent.MOUSE_MOVE, onMouse); addEventListener(MouseEvent.MOUSE_OVER, onMouse); @@ -595,6 +599,42 @@ package alternativa.engine3d.core { } pressedTarget = null; break; + case "middleMouseDown": + defineTarget(index); + if (target != null) { + propagateEvent(MouseEvent3D.MIDDLE_MOUSE_DOWN, mouseEvent, camera, target, targetSurface, branchToVector(target, branch)); + } + pressedTarget = target; + break; + case "middleClick": + defineTarget(index); + if (target != null) { + propagateEvent(MouseEvent3D.MIDDLE_MOUSE_UP, mouseEvent, camera, target, targetSurface, branchToVector(target, branch)); + if (pressedTarget == target) { + clickedTarget = target; + propagateEvent(MouseEvent3D.MIDDLE_CLICK, mouseEvent, camera, target, targetSurface, branchToVector(target, branch)); + } + } + pressedTarget = null; + break; + case "rightMouseDown": + defineTarget(index); + if (target != null) { + propagateEvent(MouseEvent3D.RIGHT_MOUSE_DOWN, mouseEvent, camera, target, targetSurface, branchToVector(target, branch)); + } + pressedTarget = target; + break; + case "rightClick": + defineTarget(index); + if (target != null) { + propagateEvent(MouseEvent3D.RIGHT_MOUSE_UP, mouseEvent, camera, target, targetSurface, branchToVector(target, branch)); + if (pressedTarget == target) { + clickedTarget = target; + propagateEvent(MouseEvent3D.RIGHT_CLICK, mouseEvent, camera, target, targetSurface, branchToVector(target, branch)); + } + } + pressedTarget = null; + break; case "doubleClick": defineTarget(index); if (target != null) { From a92342bf4260916f2cbff66d137f9bb2a565353b Mon Sep 17 00:00:00 2001 From: Albul Date: Wed, 13 Jun 2012 16:29:39 +0400 Subject: [PATCH 4/4] fix middleUp --- src/alternativa/engine3d/core/events/MouseEvent3D.as | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/alternativa/engine3d/core/events/MouseEvent3D.as b/src/alternativa/engine3d/core/events/MouseEvent3D.as index ce03818..a4e9364 100644 --- a/src/alternativa/engine3d/core/events/MouseEvent3D.as +++ b/src/alternativa/engine3d/core/events/MouseEvent3D.as @@ -77,10 +77,10 @@ package alternativa.engine3d.core.events { public static const MIDDLE_MOUSE_DOWN:String = "middleMouseDown3D"; /** - * Defines the value of the type property of a middleMouseUp event object. - * @eventType middleMouseUp + * Defines the value of the type property of a middleMouseUp3D event object. + * @eventType middleMouseUp3D */ - public static const MIDDLE_MOUSE_UP:String = "middleMouseUp"; + public static const MIDDLE_MOUSE_UP:String = "middleMouseUp3D"; /** * Defines the value of the type property of a mouseOver3D event object.