浏览代码

refine code

/zxw-support_editor_dragdrop
Xingwei Zhu 3 年前
当前提交
f6066cbc
共有 1 个文件被更改,包括 2 次插入21 次删除
  1. 23
      com.unity.uiwidgets/Editor/gesture/editor_mouse_tracking.cs

23
com.unity.uiwidgets/Editor/gesture/editor_mouse_tracking.cs


public readonly EditorMouseTrackerAnnotation annotation;
public HashSet<int> activeDevices = new HashSet<int>();
public readonly HashSet<int> activeDevices = new HashSet<int>();
}
public class EditorMouseTracker : ChangeNotifier {

this.annotationFinder = annotationFinder;
}
public void _handleEvent(PointerEvent evt) {
//Debug.Log("handle editor mouse tracker event = " + evt.position);
void _handleEvent(PointerEvent evt) {
int deviceId = 0;
if (_trackedAnnotations.isEmpty()) {

public void schedulePostFrameCheck() {
}
void _handleDragFromEditorEvent(PointerEvent evt, int deviceId) {
if (evt is PointerDragFromEditorReleaseEvent) {
_scheduleDragFromEditorReleaseCheck();
_lastMouseEvent.Remove(deviceId);
}
else if (evt is PointerDragFromEditorEnterEvent ||
evt is PointerDragFromEditorHoverEvent ||
evt is PointerDragFromEditorExitEvent) {
if (!_lastMouseEvent.ContainsKey(deviceId) ||
_lastMouseEvent[deviceId].position != evt.position) {
_scheduleDragFromEditorMousePositionCheck();
}
_lastMouseEvent[deviceId] = evt;
}
}
void _scheduleDragFromEditorReleaseCheck() {

正在加载...
取消
保存