xingwei.zhu 6 年前
当前提交
cd184a03
共有 3 个文件被更改,包括 18 次插入6 次删除
  1. 8
      Runtime/engine/UIWidgetsPanel.cs
  2. 12
      Runtime/gestures/events.cs
  3. 4
      Runtime/gestures/mouse_tracking.cs

8
Runtime/engine/UIWidgetsPanel.cs


}
int getMouseButtonDown() {
//default mouse button key = left mouse button
var defaultKey = 0;
return InputUtils.getMouseButtonKey(key);
defaultKey = key;
break;
return 0;
return InputUtils.getMouseButtonKey(defaultKey);
}
public void OnPointerDown(PointerEventData eventData) {

12
Runtime/gestures/events.cs


position: position,
down: false) {
}
public static PointerHoverEvent fromHoverEvent(PointerEvent hover) {
return new PointerHoverEvent(
timeStamp: hover.timeStamp,
pointer: hover.pointer,
kind: hover.kind,
device: hover.device,
position: hover.position
);
}
}
public class PointerEnterEvent : PointerEvent {

down: false) {
}
public static PointerEnterEvent fromHoverEvent(PointerHoverEvent hover) {
public static PointerEnterEvent fromHoverEvent(PointerEvent hover) {
return new PointerEnterEvent(
timeStamp: hover.timeStamp,
pointer: hover.pointer,

4
Runtime/gestures/mouse_tracking.cs


if (!hitAnnotation.activeDevices.Contains(deviceId)) {
hitAnnotation.activeDevices.Add(deviceId);
if (hitAnnotation.annotation?.onEnter != null) {
hitAnnotation.annotation.onEnter(PointerEnterEvent.fromHoverEvent((PointerHoverEvent)lastEvent));
hitAnnotation.annotation.onEnter(PointerEnterEvent.fromHoverEvent(lastEvent));
hitAnnotation.annotation.onHover((PointerHoverEvent)lastEvent);
hitAnnotation.annotation.onHover(PointerHoverEvent.fromHoverEvent(lastEvent));
}
foreach (_TrackedAnnotation trackedAnnotation in this._trackedAnnotations.Values) {

正在加载...
取消
保存