mirror of
https://github.com/MapMakersAndProgrammers/Alternativa3D.git
synced 2025-10-26 09:59:10 -07:00
Merge remote-tracking branch 'remotes/Albul/master'
This commit is contained in:
@@ -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);
|
||||
@@ -619,6 +623,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) {
|
||||
|
||||
@@ -46,6 +46,42 @@ package alternativa.engine3d.core.events {
|
||||
*/
|
||||
public static const MOUSE_UP:String = "mouseUp3D";
|
||||
|
||||
/**
|
||||
* Defines the value of the <code>type</code> property of a <code>rightClick3D</code> event object.
|
||||
* @eventType rightClick3D
|
||||
*/
|
||||
public static const RIGHT_CLICK:String = "rightClick3D";
|
||||
|
||||
/**
|
||||
* Defines the value of the <code>type</code> property of a <code>rightMouseDown3D</code> event object.
|
||||
* @eventType rightMouseDown3D
|
||||
*/
|
||||
public static const RIGHT_MOUSE_DOWN:String = "rightMouseDown3D";
|
||||
|
||||
/**
|
||||
* Defines the value of the <code>type</code> property of a <code>rightMouseUp3D</code> event object.
|
||||
* @eventType rightMouseUp3D
|
||||
*/
|
||||
public static const RIGHT_MOUSE_UP:String = "rightMouseUp3D";
|
||||
|
||||
/**
|
||||
* Defines the value of the <code>type</code> property of a <code>middleClick3D</code> event object.
|
||||
* @eventType middleClick3D
|
||||
*/
|
||||
public static const MIDDLE_CLICK:String = "middleClick3D";
|
||||
|
||||
/**
|
||||
* Defines the value of the <code>type</code> property of a <code>middleMouseDown3D</code> event object.
|
||||
* @eventType middleMouseDown3D
|
||||
*/
|
||||
public static const MIDDLE_MOUSE_DOWN:String = "middleMouseDown3D";
|
||||
|
||||
/**
|
||||
* Defines the value of the <code>type</code> property of a <code>middleMouseUp3D</code> event object.
|
||||
* @eventType middleMouseUp3D
|
||||
*/
|
||||
public static const MIDDLE_MOUSE_UP:String = "middleMouseUp3D";
|
||||
|
||||
/**
|
||||
* Defines the value of the <code>type</code> property of a <code>mouseOver3D</code> event object.
|
||||
* @eventType mouseOver3D
|
||||
|
||||
Reference in New Issue
Block a user