您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
70 行
1.7 KiB
70 行
1.7 KiB
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Unity.UIWidgets.ui {
|
|
public enum PointerChange {
|
|
cancel,
|
|
add,
|
|
remove,
|
|
hover,
|
|
down,
|
|
move,
|
|
up,
|
|
scroll
|
|
}
|
|
|
|
public enum PointerDeviceKind {
|
|
touch,
|
|
mouse,
|
|
}
|
|
|
|
public class PointerData {
|
|
public PointerData(
|
|
TimeSpan timeStamp,
|
|
PointerChange change,
|
|
PointerDeviceKind kind,
|
|
int device,
|
|
double physicalX,
|
|
double physicalY) {
|
|
this.timeStamp = timeStamp;
|
|
this.change = change;
|
|
this.kind = kind;
|
|
this.device = device;
|
|
this.physicalX = physicalX;
|
|
this.physicalY = physicalY;
|
|
}
|
|
|
|
public readonly TimeSpan timeStamp;
|
|
public PointerChange change;
|
|
public PointerDeviceKind kind;
|
|
public int device;
|
|
public double physicalX;
|
|
public double physicalY;
|
|
}
|
|
|
|
public class ScrollData : PointerData {
|
|
public ScrollData(
|
|
TimeSpan timeStamp,
|
|
PointerChange change,
|
|
PointerDeviceKind kind,
|
|
int device,
|
|
double physicalX,
|
|
double physicalY,
|
|
double scrollX,
|
|
double scrollY) : base(timeStamp, change, kind, device, physicalX, physicalY) {
|
|
this.scrollX = scrollX;
|
|
this.scrollY = scrollY;
|
|
}
|
|
|
|
public double scrollX;
|
|
public double scrollY;
|
|
}
|
|
|
|
public class PointerDataPacket {
|
|
public PointerDataPacket(List<PointerData> data) {
|
|
this.data = data;
|
|
}
|
|
|
|
public readonly List<PointerData> data;
|
|
}
|
|
}
|