public override void resetProperty() { base.resetProperty(); mMutexDragView.Clear(); mDragingCallback = null; mReleaseDragCallback = null; mPositionChangeCallback = null; mOnDragViewStartCallback = null; mWindow = null; mDragDirection = DRAG_DIRECTION.HORIZONTAL; mClampType = CLAMP_TYPE.EDGE_IN_RECT; mMinRelativePos = -Vector3.one; mMaxRelativePos = Vector3.one; mMoveSpeedScale = 1.0f; mAttenuateFactor = 2.0f; mMoveToEdgeSpeed = 5.0f; mDragAngleThreshold = 0.0f; mDragLengthThreshold = 10.0f; mAutoClampSpeed = 10.0f; mClampInner = true; mAlignTopOrLeft = true; mMinMaxPosDirty = true; mAutoMoveToEdge = false; mClampInRange = false; mStartDragWindowPosition = Vector3.zero; mStartDragMousePosition = Vector3.zero; mMouseDownPos = Vector3.zero; mMoveNormal = Vector3.zero; mMoveSpeed = 0.0f; mMouseDown = false; mDraging = false; memset(mMinMaxPos, Vector3.zero); memset(mDisArray, 0.0f); }
protected float mMoveToEdgeSpeed = 5.0f; // 自动停靠到最近的边的速度 public txNGUIDragView() { mDragDirection = DRAG_DIRECTION.DD_HORIZONTAL; mClampType = CLAMP_TYPE.CT_EDGE; mMinRelativePos = -Vector3.one; mMaxRelativePos = Vector3.one; mReceiveScreenMouse = true; }
public WindowComponentDragView() { mDragDirection = DRAG_DIRECTION.DD_HORIZONTAL; mClampType = CLAMP_TYPE.CT_EDGE; mMinRelativePos = -Vector3.one; mMaxRelativePos = Vector3.one; mMinMaxPos = new Vector3[2]; mDisArray = new float[4]; mMutexDragView = new List <WindowComponentDragView>(); mDragAngleThreshold = toRadian(45.0f); mMoveSpeedScale = 1.0f; mAttenuateFactor = 2.0f; mMoveToEdgeSpeed = 5.0f; mDragAngleThreshold = 0.0f; mDragLengthThreshold = 10.0f; mAutoClampSpeed = 10.0f; mClampInner = true; mAlignTopOrLeft = true; }
public void setClampType(CLAMP_TYPE clampType) { mClampType = clampType; }
public void setClampType(CLAMP_TYPE clampType) { mDragViewComponent.setClampType(clampType); }