浏览代码

minor fixes

/siyaoH-1.17-PlatformMessage
xingweizhu 4 年前
当前提交
90fb647e
共有 3 个文件被更改,包括 12 次插入5 次删除
  1. 6
      com.unity.uiwidgets/Runtime/engine2/UIWidgetsPanel.cs
  2. 10
      com.unity.uiwidgets/Runtime/engine2/UIWidgetsPanelWrapper.cs
  3. 1
      engine/src/shell/platform/unity/windows/uiwidgets_panel.cc

6
com.unity.uiwidgets/Runtime/engine2/UIWidgetsPanel.cs


void _onScroll() {
var pos = _getPointerPosition(Input.mousePosition);
if (pos == null) {
return;
}
var delta = Input.mouseScrollDelta;
UIWidgetsPanel_onScroll(_ptr, delta.x, delta.y, pos.Value.x, pos.Value.y);
_wrapper.OnMouseScroll(Input.mouseScrollDelta, pos);
}
public void OnPointerDown(PointerEventData eventData) {

10
com.unity.uiwidgets/Runtime/engine2/UIWidgetsPanelWrapper.cs


UIWidgetsPanel_onMouseMove(_ptr, pos.Value.x, pos.Value.y);
}
public void OnMouseScroll(Vector2 delta, Vector2? pos) {
if (pos == null) {
return;
}
UIWidgetsPanel_onScroll(_ptr, delta.x, delta.y, pos.Value.x, pos.Value.y);
}
public void OnPointerDown(Vector2? pos, int pointerId) {
if (pos == null) {
return;

[DllImport(NativeBindings.dllName)]
static extern void UIWidgetsPanel_onMouseLeave(IntPtr ptr);
[DllImport(NativeBindings.dllName)]
static extern void UIWidgetsPanel_onScroll(IntPtr ptr, float x, float y, float px, float py);
}
#endregion

1
engine/src/shell/platform/unity/windows/uiwidgets_panel.cc


//_Wait
panel->ProcessMessages();
}
UIWIDGETS_API(void)
UIWidgetsPanel_onScroll(UIWidgetsPanel* panel, float x, float y, float px, float py) {

正在加载...
取消
保存