Пример #1
0
 private void OnAction(ActionType actionType, UIRemodelShipSliderThumb calledObject)
 {
     if (mUIRemodelShipSliderThumbAction != null)
     {
         mUIRemodelShipSliderThumbAction(actionType, calledObject);
     }
 }
Пример #2
0
 private bool OnCheck(CheckType checkType, UIRemodelShipSliderThumb calledObject)
 {
     if (mUIRemodelShipSliderThumbCheck != null)
     {
         return(mUIRemodelShipSliderThumbCheck(checkType, calledObject));
     }
     return(false);
 }
Пример #3
0
 private void OnDestroy()
 {
     UserInterfacePortManager.ReleaseUtils.Release(ref this.mWidget_SliderBackground);
     UserInterfacePortManager.ReleaseUtils.Release(ref this.mWidget_SliderLimit);
     UserInterfacePortManager.ReleaseUtils.Release(ref this.mLabel_Index);
     this.mUIRemodelShipSliderThumb_Thumb = null;
     this.mDeckModel     = null;
     this.mKeyController = null;
 }
Пример #4
0
 private void ProcessSliderThumbAction(UIRemodelShipSliderThumb.ActionType actionType, UIRemodelShipSliderThumb calledObject)
 {
     if (!base.get_enabled())
     {
         return;
     }
     if (actionType != UIRemodelShipSliderThumb.ActionType.Move)
     {
         if (actionType == UIRemodelShipSliderThumb.ActionType.FingerUp)
         {
             calledObject.get_transform().localPositionY((float)(-(float)this.mIndex * this.mCellHeight));
         }
     }
     else
     {
         calledObject.get_transform().set_position(calledObject.mNextDragWorldPosition);
         if (0f < calledObject.get_transform().get_localPosition().y)
         {
             calledObject.get_transform().localPositionY(0f);
         }
         else if (calledObject.get_transform().get_localPosition().y < (float)(-(float)((this.mShipCount - 1) * this.mCellHeight)))
         {
             calledObject.get_transform().localPositionY((float)(-(float)((this.mShipCount - 1) * this.mCellHeight)));
         }
         this.OnUpdateIndex(this.ThumbLocalPositionToIndex(calledObject.get_transform().get_localPosition()));
     }
 }
Пример #5
0
 private bool OnCheck(UIRemodelShipSliderThumb.CheckType checkType, UIRemodelShipSliderThumb calledObject)
 {
     return(this.mUIRemodelShipSliderThumbCheck != null && this.mUIRemodelShipSliderThumbCheck(checkType, calledObject));
 }
Пример #6
0
        private void ProcessSliderThumbAction(UIRemodelShipSliderThumb.ActionType actionType, UIRemodelShipSliderThumb calledObject)
        {
            if (!base.enabled)
            {
                return;
            }
            switch (actionType)
            {
            case UIRemodelShipSliderThumb.ActionType.Move:
            {
                calledObject.transform.position = calledObject.mNextDragWorldPosition;
                Vector3 localPosition = calledObject.transform.localPosition;
                if (0f < localPosition.y)
                {
                    calledObject.transform.localPositionY(0f);
                }
                else
                {
                    Vector3 localPosition2 = calledObject.transform.localPosition;
                    if (localPosition2.y < (float)(-((mShipCount - 1) * mCellHeight)))
                    {
                        calledObject.transform.localPositionY(-((mShipCount - 1) * mCellHeight));
                    }
                }
                OnUpdateIndex(ThumbLocalPositionToIndex(calledObject.transform.localPosition));
                break;
            }

            case UIRemodelShipSliderThumb.ActionType.FingerUp:
                calledObject.transform.localPositionY(-mIndex * mCellHeight);
                break;
            }
        }