|
|
|
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using Unity.UIWidgets.async; |
|
|
|
using Unity.UIWidgets.engine; |
|
|
|
using Unity.UIWidgets.foundation; |
|
|
|
using Unity.UIWidgets.rendering; |
|
|
|
using Unity.UIWidgets.scheduler; |
|
|
|
|
|
|
timeStamp: Timer.timespanSinceStartup, |
|
|
|
change: PointerChange.down, |
|
|
|
kind: PointerDeviceKind.mouse, |
|
|
|
device: evt.button, |
|
|
|
device: InputUtils.getMouseButtonKey(evt.button), |
|
|
|
physicalX: evt.mousePosition.x * this._devicePixelRatio, |
|
|
|
physicalY: evt.mousePosition.y * this._devicePixelRatio |
|
|
|
); |
|
|
|
|
|
|
timeStamp: Timer.timespanSinceStartup, |
|
|
|
change: PointerChange.up, |
|
|
|
kind: PointerDeviceKind.mouse, |
|
|
|
device: evt.button, |
|
|
|
device: InputUtils.getMouseButtonKey(evt.button), |
|
|
|
physicalX: evt.mousePosition.x * this._devicePixelRatio, |
|
|
|
physicalY: evt.mousePosition.y * this._devicePixelRatio |
|
|
|
); |
|
|
|
|
|
|
timeStamp: Timer.timespanSinceStartup, |
|
|
|
change: PointerChange.move, |
|
|
|
kind: PointerDeviceKind.mouse, |
|
|
|
device: evt.button, |
|
|
|
device: InputUtils.getMouseButtonKey(evt.button), |
|
|
|
physicalX: evt.mousePosition.x * this._devicePixelRatio, |
|
|
|
physicalY: evt.mousePosition.y * this._devicePixelRatio |
|
|
|
); |
|
|
|
|
|
|
timeStamp: Timer.timespanSinceStartup, |
|
|
|
change: PointerChange.hover, |
|
|
|
kind: PointerDeviceKind.mouse, |
|
|
|
device: evt.button, |
|
|
|
device: InputUtils.getMouseButtonKey(evt.button), |
|
|
|
physicalX: evt.mousePosition.x * this._devicePixelRatio, |
|
|
|
physicalY: evt.mousePosition.y * this._devicePixelRatio |
|
|
|
); |
|
|
|
|
|
|
-evt.delta.y * this._devicePixelRatio, |
|
|
|
evt.mousePosition.x * this._devicePixelRatio, |
|
|
|
evt.mousePosition.y * this._devicePixelRatio, |
|
|
|
evt.button |
|
|
|
InputUtils.getMouseButtonKey(evt.button) |
|
|
|
); |
|
|
|
} |
|
|
|
else if (evt.type == EventType.DragUpdated) { |
|
|
|
|
|
|
kind: PointerDeviceKind.mouse, |
|
|
|
device: evt.button, |
|
|
|
device: InputUtils.getMouseButtonKey(evt.button), |
|
|
|
physicalX: evt.mousePosition.x * this._devicePixelRatio, |
|
|
|
physicalY: evt.mousePosition.y * this._devicePixelRatio |
|
|
|
); |
|
|
|
|
|
|
timeStamp: Timer.timespanSinceStartup, |
|
|
|
change: PointerChange.dragFromEditorRelease, |
|
|
|
kind: PointerDeviceKind.mouse, |
|
|
|
device: evt.button, |
|
|
|
device: InputUtils.getMouseButtonKey(evt.button), |
|
|
|
physicalX: evt.mousePosition.x * this._devicePixelRatio, |
|
|
|
physicalY: evt.mousePosition.y * this._devicePixelRatio |
|
|
|
); |
|
|
|