浏览代码

[Format] Remove unnecessary annotations

/main
iizzaya 5 年前
当前提交
8b9854e6
共有 3 个文件被更改,包括 32 次插入29 次删除
  1. 11
      Runtime/rendering/proxy_box.cs
  2. 2
      Runtime/ui/pointer.cs
  3. 48
      Runtime/widgets/basic.cs

11
Runtime/rendering/proxy_box.cs


PointerUpEventListener onPointerUp = null,
PointerCancelEventListener onPointerCancel = null,
PointerScrollEventListener onPointerScroll = null,
PointerDragFromEditorEnterEventListener onPointerDragFromEditorEnter = null,
PointerDragFromEditorHoverEventListener onPointerDragFromEditorHover = null,
PointerDragFromEditorExitEventListener onPointerDragFromEditorExit = null,
PointerDragFromEditorReleaseEventListener onPointerDragFromEditorRelease = null,
// Drag & Drop
,PointerDragFromEditorEnterEventListener onPointerDragFromEditorEnter = null
,PointerDragFromEditorHoverEventListener onPointerDragFromEditorHover = null
,PointerDragFromEditorExitEventListener onPointerDragFromEditorExit = null
,PointerDragFromEditorReleaseEventListener onPointerDragFromEditorRelease = null
) : base(behavior: behavior, child: child) {
this.onPointerDown = onPointerDown;
this.onPointerMove = onPointerMove;

this._onPointerHover = onPointerHover;
this._onPointerExit = onPointerExit;
// Drag & Drop
this._onPointerDragFromEditorEnter = onPointerDragFromEditorEnter;
this._onPointerDragFromEditorHover = onPointerDragFromEditorHover;
this._onPointerDragFromEditorExit = onPointerDragFromEditorExit;

2
Runtime/ui/pointer.cs


move,
up,
scroll,
dragFromEditorMove, // Drag & Drop
dragFromEditorMove,
dragFromEditorRelease
}

48
Runtime/widgets/basic.cs


PointerUpEventListener onPointerUp = null,
PointerCancelEventListener onPointerCancel = null,
PointerScrollEventListener onPointerScroll = null,
HitTestBehavior behavior = HitTestBehavior.deferToChild,
Widget child = null,
// Drag & Drop
PointerDragFromEditorReleaseEventListener onPointerDragFromEditorRelease = null
PointerDragFromEditorReleaseEventListener onPointerDragFromEditorRelease = null,
HitTestBehavior behavior = HitTestBehavior.deferToChild,
Widget child = null
) : base(key: key, child: child) {
this.onPointerDown = onPointerDown;
this.onPointerMove = onPointerMove;

this.onPointerEnter = onPointerEnter;
this.onPointerScroll = onPointerScroll;
this.behavior = behavior;
// Drag & Drop
this.onPointerDragFromEditorEnter = onPointerDragFromEditorEnter;
this.onPointerDragFromEditorHover = onPointerDragFromEditorHover;
this.onPointerDragFromEditorExit = onPointerDragFromEditorExit;

public readonly PointerScrollEventListener onPointerScroll;
public readonly HitTestBehavior behavior;
// Drag & Drop
public override RenderObject createRenderObject(BuildContext context) {
return new RenderPointerListener(
onPointerDown: this.onPointerDown,

onPointerExit: this.onPointerExit,
onPointerHover: this.onPointerHover,
onPointerScroll: this.onPointerScroll,
behavior: this.behavior,
// Drag & Drop
onPointerDragFromEditorRelease: this.onPointerDragFromEditorRelease
onPointerDragFromEditorRelease: this.onPointerDragFromEditorRelease,
behavior: this.behavior
);
}

renderObject.behavior = this.behavior;
#if UNITY_EDITOR
// Drag & Drop
renderObject.onPointerDragFromEditorEnter = this.onPointerDragFromEditorEnter;
renderObject.onPointerDragFromEditorHover = this.onPointerDragFromEditorHover;
renderObject.onPointerDragFromEditorExit = this.onPointerDragFromEditorExit;

if (this.onPointerScroll != null) {
listeners.Add("scroll");
}
// Drag & Drop
if (this.onPointerDragFromEditorEnter != null) listeners.Add("dragFromEditorEnter");
if (this.onPointerDragFromEditorHover != null) listeners.Add("dragFromEditorHover");
if (this.onPointerDragFromEditorExit != null) listeners.Add("dragFromEditorExit");
if (this.onPointerDragFromEditorRelease != null) listeners.Add("dragFromEditorRelease");
if (this.onPointerDragFromEditorEnter != null) {
listeners.Add("dragFromEditorEnter");
}
if (this.onPointerDragFromEditorHover != null) {
listeners.Add("dragFromEditorHover");
}
if (this.onPointerDragFromEditorExit != null) {
listeners.Add("dragFromEditorExit");
}
if (this.onPointerDragFromEditorRelease != null) {
listeners.Add("dragFromEditorRelease");
}
#endif
properties.add(new EnumerableProperty<string>("listeners", listeners, ifEmpty: "<none>"));

正在加载...
取消
保存