Beispiel #1
0
        public virtual bool HandleAction(UIActionType actiontype, UIAction action)
        {
            switch (actiontype)
            {
            case UIActionType.Begin:
            case UIActionType.Enter:
                if (!Clicked || multiClick)
                {
                    clickCount++;
                    Click?.Invoke();
                }
                break;

            case UIActionType.End:
                if (Clicked)
                {
                    clickCount--;
                    if (!Clicked)
                    {
                        Release?.Invoke();
                    }
                }
                break;

            case UIActionType.Leave:
                if (Clicked)
                {
                    clickCount--;
                    if (!Clicked)
                    {
                        Leave?.Invoke();
                    }
                }
                break;
            }
            return(true);
        }