Beispiel #1
0
 private void OnAction(ActionType actionType, UIScrollListChild <__Model__> targetChild)
 {
     if (this.mUIScrollListChildAction != null)
     {
         this.mUIScrollListChildAction(actionType, targetChild);
     }
 }
 protected virtual void OnChildAction(ActionType actionType, UIScrollListChild <Model> actionChild)
 {
     if (mKeyController != null && actionType == ActionType.OnTouch && actionChild.Model != null && actionChild.mIsClickable)
     {
         ChangeFocusView((View)actionChild, isFirstFocus: false);
         OnAction(actionType, this, (View)actionChild);
     }
 }
Beispiel #3
0
 private void OnDestroy()
 {
     this.mButton_Action           = null;
     this.mUIScrollListChildAction = null;
     this.mWidgetThis     = null;
     this.Model           = (__Model__)((object)null);
     this.cachedTransform = null;
     this.OnCallDestroy();
 }
Beispiel #4
0
        public Vector3 GenerateConnectToPosition(UIScrollListChild <__Model__> target, ConnectType connectType)
        {
            Vector3 localPosition = target.transform.localPosition;

            switch (connectType)
            {
            case ConnectType.Top:
            {
                ref Vector3 reference2 = ref mNextLocalPositionCache;
                float       x2         = localPosition.x;
                float       y2         = localPosition.y;
                Vector2     size2      = Size;
                reference2.Set(x2, y2 + size2.y, localPosition.z);
                break;
            }
Beispiel #5
0
 protected virtual void OnChildAction(ActionType actionType, UIScrollListChild <Model> actionChild)
 {
     if (this.mKeyController == null)
     {
         return;
     }
     if (actionType == ActionType.OnTouch)
     {
         if (actionChild.Model != null && actionChild.mIsClickable)
         {
             this.ChangeFocusView((View)((object)actionChild), false);
             this.OnAction(actionType, this, (View)((object)actionChild));
         }
     }
 }
Beispiel #6
0
        public Vector3 GenerateConnectToPosition(UIScrollListChild <__Model__> target, ConnectType connectType)
        {
            Vector3 localPosition = target.get_transform().get_localPosition();

            if (connectType != ConnectType.Top)
            {
                if (connectType != ConnectType.Bottom)
                {
                    this.mNextLocalPositionCache.Set(0f, 0f, 0f);
                }
                else
                {
                    this.mNextLocalPositionCache.Set(localPosition.x, localPosition.y - target.Size.y, localPosition.z);
                }
            }
            else
            {
                this.mNextLocalPositionCache.Set(localPosition.x, localPosition.y + this.Size.y, localPosition.z);
            }
            return(this.mNextLocalPositionCache);
        }
Beispiel #7
0
 public void SetOnActionListener(UIScrollListChild <__Model__> .UIScrollListChildAction method)
 {
     this.mUIScrollListChildAction = method;
 }