starling/core/Starling.as
case TouchEvent.TOUCH_END: phase = TouchPhase.ENDED; break;
case MouseEvent.MOUSE_DOWN: phase = TouchPhase.BEGAN; break;
case MouseEvent.MOUSE_UP: phase = TouchPhase.ENDED; break;
+ case MouseEvent.RIGHT_MOUSE_DOWN: phase = TouchPhase.RIGHT_BEGAN; break;
+ case MouseEvent.RIGHT_MOUSE_UP: phase = TouchPhase.RIGHT_ENDED; break;
case MouseEvent.MOUSE_MOVE:
phase = (mLeftMouseDown ? TouchPhase.MOVED : TouchPhase.HOVER); break;
}
...
...
...
if (!multitouchEnabled || Mouse.supportsCursor)
- types.push(MouseEvent.MOUSE_DOWN, MouseEvent.MOUSE_MOVE, MouseEvent.MOUSE_UP);
+ types.push(MouseEvent.MOUSE_DOWN, MouseEvent.MOUSE_MOVE, MouseEvent.MOUSE_UP, MouseEvent.RIGHT_MOUSE_DOWN, MouseEvent.RIGHT_MOUSE_UP);
return types;
}
starling/events/TouchPhase.as
public static const HOVER:String = "hover";
+
+ /** Only available for mouse input: right mouse button was pressed */
+ public static var RIGHT_BEGAN : String = "right_began"
+
+ /** Only available for mouse input: right mouse button was released */
+ public static const RIGHT_ENDED : String = "right_ended";
/** The finger touched the screen just now, or the mouse button was pressed. */
public static const BEGAN:String = "began";
starling right click
2015年6月10日 星期三 by Hu, Ching-Hsiang
訂閱:
張貼留言 (Atom)
0 意見:
張貼留言