private void DispatchUIEvent(enUIEventType eventType, PointerEventData pointerEventData)
        {
            CUIEvent uIEvent = Singleton <CUIEventManager> .GetInstance().GetUIEvent();

            if (eventType != enUIEventType.Down)
            {
                if (eventType != enUIEventType.Click)
                {
                    if (eventType == enUIEventType.Up)
                    {
                        if (this.m_onUpEventID == enUIEventID.None)
                        {
                            return;
                        }
                        uIEvent.m_eventID     = this.m_onUpEventID;
                        uIEvent.m_eventParams = this.m_onUpEventParams;
                    }
                }
                else
                {
                    this.PostWwiseEvent(this.m_onDownWwiseEvents);
                    this.PostWwiseEvent(this.m_onClickedWwiseEvents);
                    if (this.m_onClickEventID == enUIEventID.None)
                    {
                        if (this.onClick != null)
                        {
                            uIEvent.m_eventID     = enUIEventID.None;
                            uIEvent.m_eventParams = this.m_onClickEventParams;
                            uIEvent.m_srcWidget   = base.gameObject;
                            this.onClick(uIEvent);
                        }
                        return;
                    }
                    uIEvent.m_eventID     = this.m_onClickEventID;
                    uIEvent.m_eventParams = this.m_onClickEventParams;
                }
            }
            else
            {
                if (this.m_onDownEventID == enUIEventID.None)
                {
                    return;
                }
                uIEvent.m_eventID     = this.m_onDownEventID;
                uIEvent.m_eventParams = this.m_onDownEventParams;
            }
            uIEvent.m_srcFormScript = this.m_belongedFormScript;
            uIEvent.m_srcWidgetBelongedListScript  = this.m_belongedListScript;
            uIEvent.m_srcWidgetIndexInBelongedList = this.m_indexInlist;
            uIEvent.m_srcWidget        = base.gameObject;
            uIEvent.m_srcWidgetScript  = this;
            uIEvent.m_pointerEventData = pointerEventData;
            if (eventType == enUIEventType.Click && this.onClick != null)
            {
                this.onClick(uIEvent);
            }
            base.DispatchUIEvent(uIEvent);
        }
예제 #2
0
    private void DispatchUIEvent(enUIEventType eventType, PointerEventData pointerEventData)
    {
        UIEvent uIEvent = Singleton <UIEventManager> .GetInstance().GetUIEvent();

        if (eventType != enUIEventType.Down)
        {
            if (eventType != enUIEventType.Click)
            {
                if (eventType == enUIEventType.Up)
                {
                    if (onUpEventID == enUIEventID.None)
                    {
                        return;
                    }
                    uIEvent.eventID     = onUpEventID;
                    uIEvent.eventParams = onUpEventParams;
                }
            }
            else
            {
                PostWwiseEvent(onClickedWwiseEvents);
                if (onClickEventID == enUIEventID.None)
                {
                    if (onClick != null)
                    {
                        uIEvent.eventID     = enUIEventID.None;
                        uIEvent.eventParams = onClickEventParams;
                        onClick(uIEvent);
                    }
                    return;
                }
                uIEvent.eventID     = onClickEventID;
                uIEvent.eventParams = onClickEventParams;
            }
        }
        else
        {
            PostWwiseEvent(onDownWwiseEvents);
            if (onDownEventID == enUIEventID.None)
            {
                return;
            }
            uIEvent.eventID     = onDownEventID;
            uIEvent.eventParams = onDownEventParams;
        }
        uIEvent.srcFormScript = belongedFormScript;
        uIEvent.srcWidgetBelongedListScript  = belongedListScript;
        uIEvent.SrcWidgetIndexInBelongedList = indexInList;
        uIEvent.srcWidget        = gameObject;
        uIEvent.srcWidgetScript  = this;
        uIEvent.pointerEventData = pointerEventData;
        if (eventType == enUIEventType.Click && onClick != null)
        {
            onClick(uIEvent);
        }
        DispatchUIEvent(uIEvent);
    }
예제 #3
0
        public void SetUIEvent(enUIEventType eventType, enUIEventID eventID, stUIEventParams eventParams)
        {
            switch (eventType)
            {
            case enUIEventType.Down:
                this.m_onDownEventID     = eventID;
                this.m_onDownEventParams = eventParams;
                break;

            case enUIEventType.Click:
                this.m_onClickEventID     = eventID;
                this.m_onClickEventParams = eventParams;
                break;

            case enUIEventType.HoldStart:
                this.m_onHoldStartEventID     = eventID;
                this.m_onHoldStartEventParams = eventParams;
                break;

            case enUIEventType.Hold:
                this.m_onHoldEventID     = eventID;
                this.m_onHoldEventParams = eventParams;
                break;

            case enUIEventType.HoldEnd:
                this.m_onHoldEndEventID     = eventID;
                this.m_onHoldEndEventParams = eventParams;
                break;

            case enUIEventType.DragStart:
                this.m_onDragStartEventID     = eventID;
                this.m_onDragStartEventParams = eventParams;
                break;

            case enUIEventType.Drag:
                this.m_onDragEventID     = eventID;
                this.m_onDragEventParams = eventParams;
                break;

            case enUIEventType.DragEnd:
                this.m_onDragEndEventID     = eventID;
                this.m_onDragEndEventParams = eventParams;
                break;

            case enUIEventType.Drop:
                this.m_onDropEventID     = eventID;
                this.m_onDropEventParams = eventParams;
                break;

            case enUIEventType.Up:
                this.m_onUpEventID     = eventID;
                this.m_onUpEventParams = eventParams;
                break;
            }
        }
예제 #4
0
        public void SetUIEvent(enUIEventType eventType, enUIEventID eventID)
        {
            switch (eventType)
            {
            case enUIEventType.Down:
                this.m_onDownEventID = eventID;
                break;

            case enUIEventType.Click:
                this.m_onClickEventID = eventID;
                break;

            case enUIEventType.Up:
                this.m_onUpEventID = eventID;
                break;
            }
        }
 public void SetUIEvent(enUIEventType eventType, enUIEventID eventID)
 {
     if (eventType != enUIEventType.Down)
     {
         if (eventType != enUIEventType.Click)
         {
             if (eventType == enUIEventType.Up)
             {
                 this.m_onUpEventID = eventID;
             }
         }
         else
         {
             this.m_onClickEventID = eventID;
         }
     }
     else
     {
         this.m_onDownEventID = eventID;
     }
 }
예제 #6
0
 public void SetUIEvent(enUIEventType eventType, enUIEventID eventID, stUIEventParams eventParams)
 {
     if (eventType != enUIEventType.Down)
     {
         if (eventType != enUIEventType.Click)
         {
             if (eventType == enUIEventType.Up)
             {
                 onUpEventID     = eventID;
                 onUpEventParams = eventParams;
             }
         }
         else
         {
             onClickEventID     = eventID;
             onClickEventParams = eventParams;
         }
     }
     else
     {
         onDownEventID     = eventID;
         onDownEventParams = eventParams;
     }
 }
예제 #7
0
        private void DispatchUIEvent(enUIEventType eventType, PointerEventData pointerEventData)
        {
            CUIEvent uIEvent = Singleton <CUIEventManager> .GetInstance().GetUIEvent();

            switch (eventType)
            {
            case enUIEventType.Down:
                if (this.m_onDownEventID != enUIEventID.None)
                {
                    uIEvent.m_eventID     = this.m_onDownEventID;
                    uIEvent.m_eventParams = this.m_onDownEventParams;
                    break;
                }
                return;

            case enUIEventType.Click:
                this.PostWwiseEvent(this.m_onDownWwiseEvents);
                this.PostWwiseEvent(this.m_onClickedWwiseEvents);
                if (this.m_onClickEventID != enUIEventID.None)
                {
                    uIEvent.m_eventID     = this.m_onClickEventID;
                    uIEvent.m_eventParams = this.m_onClickEventParams;
                    break;
                }
                if (this.onClick != null)
                {
                    uIEvent.m_eventID     = enUIEventID.None;
                    uIEvent.m_eventParams = this.m_onClickEventParams;
                    uIEvent.m_srcWidget   = base.gameObject;
                    this.onClick(uIEvent);
                }
                return;

            case enUIEventType.HoldStart:
                if (this.m_onHoldStartEventID != enUIEventID.None)
                {
                    uIEvent.m_eventID     = this.m_onHoldStartEventID;
                    uIEvent.m_eventParams = this.m_onHoldStartEventParams;
                    break;
                }
                return;

            case enUIEventType.Hold:
                if (this.m_onHoldEventID != enUIEventID.None)
                {
                    uIEvent.m_eventID     = this.m_onHoldEventID;
                    uIEvent.m_eventParams = this.m_onHoldEventParams;
                    break;
                }
                return;

            case enUIEventType.HoldEnd:
                if (this.m_onHoldEndEventID != enUIEventID.None)
                {
                    uIEvent.m_eventID     = this.m_onHoldEndEventID;
                    uIEvent.m_eventParams = this.m_onHoldEndEventParams;
                    break;
                }
                return;

            case enUIEventType.DragStart:
                if (this.m_onDragStartEventID != enUIEventID.None)
                {
                    uIEvent.m_eventID     = this.m_onDragStartEventID;
                    uIEvent.m_eventParams = this.m_onDragStartEventParams;
                    break;
                }
                return;

            case enUIEventType.Drag:
                if (this.m_onDragEventID != enUIEventID.None)
                {
                    uIEvent.m_eventID     = this.m_onDragEventID;
                    uIEvent.m_eventParams = this.m_onDragEventParams;
                    break;
                }
                return;

            case enUIEventType.DragEnd:
                if (this.m_onDragEndEventID != enUIEventID.None)
                {
                    uIEvent.m_eventID     = this.m_onDragEndEventID;
                    uIEvent.m_eventParams = this.m_onDragEndEventParams;
                    break;
                }
                return;

            case enUIEventType.Drop:
                if (this.m_onDropEventID != enUIEventID.None)
                {
                    uIEvent.m_eventID     = this.m_onDropEventID;
                    uIEvent.m_eventParams = this.m_onDropEventParams;
                    break;
                }
                return;

            case enUIEventType.Up:
                if (this.m_onUpEventID != enUIEventID.None)
                {
                    uIEvent.m_eventID     = this.m_onUpEventID;
                    uIEvent.m_eventParams = this.m_onUpEventParams;
                    break;
                }
                return;
            }
            uIEvent.m_srcFormScript = base.m_belongedFormScript;
            uIEvent.m_srcWidgetBelongedListScript  = base.m_belongedListScript;
            uIEvent.m_srcWidgetIndexInBelongedList = base.m_indexInlist;
            uIEvent.m_srcWidget        = base.gameObject;
            uIEvent.m_srcWidgetScript  = this;
            uIEvent.m_pointerEventData = pointerEventData;
            if ((eventType == enUIEventType.Click) && (this.onClick != null))
            {
                this.onClick(uIEvent);
            }
            base.DispatchUIEvent(uIEvent);
        }
예제 #8
0
    private void DispatchUIEvent(enUIEventType eventType, PointerEventData pointerEventData)
    {
        UIEvent uiEvent = Singleton <UIEventManager> .GetInstance().GetUIEvent();

        switch (eventType)
        {
        case enUIEventType.Down:
            if (m_onDownEventID == enUIEventID.None)
            {
                return;
            }
            uiEvent.eventID     = m_onDownEventID;
            uiEvent.eventParams = m_onDownEventParams;
            break;

        case enUIEventType.Click:
            PostWwiseEvent(m_onDownWwiseEvents);
            PostWwiseEvent(m_onClickedWwiseEvents);
            if (m_onClickEventID == enUIEventID.None)
            {
                if (onClick != null)
                {
                    uiEvent.eventID     = enUIEventID.None;
                    uiEvent.eventParams = m_onClickEventParams;
                    uiEvent.srcWidget   = gameObject;
                    onClick(uiEvent);
                }
                return;
            }
            uiEvent.eventID     = m_onClickEventID;
            uiEvent.eventParams = m_onClickEventParams;
            break;

        case enUIEventType.HoldStart:
            if (this.m_onHoldStartEventID == enUIEventID.None)
            {
                return;
            }
            uiEvent.eventID     = m_onHoldStartEventID;
            uiEvent.eventParams = m_onHoldStartEventParams;
            break;

        case enUIEventType.Hold:
            if (m_onHoldEventID == enUIEventID.None)
            {
                return;
            }
            uiEvent.eventID     = m_onHoldEventID;
            uiEvent.eventParams = m_onHoldEventParams;
            break;

        case enUIEventType.HoldEnd:
            if (m_onHoldEndEventID == enUIEventID.None)
            {
                return;
            }
            uiEvent.eventID     = m_onHoldEndEventID;
            uiEvent.eventParams = m_onHoldEndEventParams;
            break;

        case enUIEventType.DragStart:
            if (m_onDragStartEventID == enUIEventID.None)
            {
                return;
            }
            uiEvent.eventID     = m_onDragStartEventID;
            uiEvent.eventParams = m_onDragStartEventParams;
            break;

        case enUIEventType.Drag:
            if (m_onDragEventID == enUIEventID.None)
            {
                return;
            }
            uiEvent.eventID     = m_onDragEventID;
            uiEvent.eventParams = m_onDragEventParams;
            break;

        case enUIEventType.DragEnd:
            if (m_onDragEndEventID == enUIEventID.None)
            {
                return;
            }
            uiEvent.eventID     = m_onDragEndEventID;
            uiEvent.eventParams = m_onDragEndEventParams;
            break;

        case enUIEventType.Drop:
            if (m_onDropEventID == enUIEventID.None)
            {
                return;
            }
            uiEvent.eventID     = m_onDropEventID;
            uiEvent.eventParams = m_onDropEventParams;
            break;

        case enUIEventType.Up:
            if (m_onUpEventID == enUIEventID.None)
            {
                return;
            }
            uiEvent.eventID     = m_onUpEventID;
            uiEvent.eventParams = m_onUpEventParams;
            break;
        }
        uiEvent.srcFormScript = belongedFormScript;
        uiEvent.srcWidgetBelongedListScript  = belongedListScript;
        uiEvent.SrcWidgetIndexInBelongedList = indexInList;
        uiEvent.srcWidget        = gameObject;
        uiEvent.srcWidgetScript  = this;
        uiEvent.pointerEventData = pointerEventData;
        if (eventType == enUIEventType.Click && onClick != null)
        {
            onClick(uiEvent);
        }
        base.DispatchUIEvent(uiEvent);
    }
예제 #9
0
    public void SetUIEvent(enUIEventType eventType, enUIEventID eventID)
    {
        switch (eventType)
        {
        case enUIEventType.Down:
        {
            m_onDownEventID = eventID;
            break;
        }

        case enUIEventType.Click:
        {
            m_onClickEventID = eventID;
            break;
        }

        case enUIEventType.HoldStart:
        {
            m_onHoldStartEventID = eventID;
            break;
        }

        case enUIEventType.Hold:
        {
            m_onHoldEventID = eventID;
            break;
        }

        case enUIEventType.HoldEnd:
        {
            m_onHoldEndEventID = eventID;
            break;
        }

        case enUIEventType.DragStart:
        {
            m_onDragStartEventID = eventID;
            break;
        }

        case enUIEventType.Drag:
        {
            m_onDragEventID = eventID;
            break;
        }

        case enUIEventType.DragEnd:
        {
            m_onDragEndEventID = eventID;
            break;
        }

        case enUIEventType.Drop:
        {
            m_onDropEventID = eventID;
            break;
        }

        case enUIEventType.Up:
        {
            m_onUpEventID = eventID;
            break;
        }
        }
    }