//-------------------------------------------------------------------------------------------------------------- protected bool checkStartTouchDrag(ref Touch touch) { Vector3 mousePosition = touch.position; if (mouseInObject(ref mousePosition)) { // 拖拽消息不向下传递, 从上往下查找,如果前面没有窗口需要有拖拽消息被处理,则当前窗口响应拖拽消息 var hoverWindowList = mGlobalTouchSystem.getAllHoverWindow(ref mousePosition); int count = hoverWindowList.Count; for (int i = 0; i < count; ++i) { IMouseEventCollect item = hoverWindowList[i]; if (item == mComponentOwner as IMouseEventCollect) { onMouseDown(mousePosition); return(true); } if (item.isDragable()) { break; } } } return(false); }
protected void checkStartDrag(Vector3 mousePosition) { if (mInputManager.getMouseDown(MOUSE_BUTTON.LEFT) && mouseInObject(ref mousePosition)) { // 从上往下查找,如果前面没有窗口需要有拖拽消息被处理,则当前窗口响应拖拽消息 var hoverWindowList = mGlobalTouchSystem.getAllHoverWindow(ref mousePosition); int count = hoverWindowList.Count; for (int i = 0; i < count; ++i) { IMouseEventCollect item = hoverWindowList[i]; if (item == mComponentOwner as IMouseEventCollect) { onMouseDown(mousePosition); break; } else if (item.isDragable()) { break; } } } }