浏览代码

Merge pull request #98 from Unity-Technologies/wsy_scrollwindow

add scroll in editor window
/siyaoH-1.17-PlatformMessage
GitHub 4 年前
当前提交
cb891e8e
共有 2 个文件被更改,包括 8 次插入4 次删除
  1. 6
      com.unity.uiwidgets/Editor/UIWidgetsEditorPanel.cs
  2. 6
      com.unity.uiwidgets/Runtime/rendering/list_wheel_viewport.cs

6
com.unity.uiwidgets/Editor/UIWidgetsEditorPanel.cs


var pos = _getPointerPosition(evt.mousePosition);
_wrapper.OnMouseMove(pos);
}
else if (evt.type == EventType.ScrollWheel && evt.delta.magnitude != 0) {
var delta = evt.delta;
delta.y /= 3f;
var pos = _getPointerPosition(evt.mousePosition);
_wrapper.OnMouseScroll(delta, pos);
}
}

6
com.unity.uiwidgets/Runtime/rendering/list_wheel_viewport.cs


untransformedPaintingCoordinates.dx,
-_topScrollMarginExtent
);
bool shouldApplyOffCenterDim = overAndUnderCenterOpacity < 1;
if (useMagnifier || shouldApplyOffCenterDim) {
_paintChildWithMagnifier(context, offset, child, transform, offsetToCenter, untransformedPaintingCoordinates);

context1.pushTransform(
needsCompositing,
offset1,
cylindricalTransform,
// this._centerOriginTransform(cylindricalTransform),
_magnifyTransform(),
(PaintingContext context2, Offset offset2) => {
context2.paintChild(child, offset2 + untransformedPaintingCoordinates);
});

正在加载...
取消
保存