|
|
|
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using Unity.UIWidgets.foundation; |
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
public class MouseTrackerAnnotation { |
|
|
|
public class MouseTrackerAnnotation : Diagnosticable { |
|
|
|
public MouseTrackerAnnotation( |
|
|
|
PointerEnterEventListener onEnter = null, |
|
|
|
PointerHoverEventListener onHover = null, |
|
|
|
|
|
|
return |
|
|
|
$"{GetType()}#{GetHashCode()}{(onEnter == null ? "" : " onEnter")}{(onHover == null ? "" : " onHover")}{(onExit == null ? "" : " onExit")}"; |
|
|
|
} |
|
|
|
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) { |
|
|
|
base.debugFillProperties(properties); |
|
|
|
properties.add(new FlagsSummary<Delegate>( |
|
|
|
"callbacks", |
|
|
|
new Dictionary<string, Delegate> { |
|
|
|
{"enter", onEnter}, |
|
|
|
{"hover", onHover}, |
|
|
|
{"exit", onExit}, |
|
|
|
}, |
|
|
|
ifEmpty: "<none>" |
|
|
|
)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public class _TrackedAnnotation { |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public readonly MouseDetectorAnnotationFinder annotationFinder; |
|
|
|
readonly Dictionary<int, PointerEvent> _lastMouseEvent = new Dictionary<int, PointerEvent>(); |
|
|
|
get { return _lastMouseEvent.isNotEmpty(); } |
|
|
|
get { return _mouseStates.isNotEmpty(); } |
|
|
|
} |
|
|
|
public static bool _shouldMarkStateDirty(_MouseState state, PointerEvent value) { |
|
|
|
if (state == null) |
|
|
|