Exemple #1
0
        // Mouse release handler
        private void OnReleaseHandler()
        {
            if (IsEnabled && Time.realtimeSinceStartup - _interactionTime > _interactionDelay)
            {
                if (IsPressed)
                {
                    IsPressed = false;

                    OnClick.InvokeIfNotNull();

                    Signals.DispatchGroup(_signalsClick);
                }

                SetState(IsHovered ? State.Hover : State.Normal);

                _interactionTime = Time.realtimeSinceStartup;
            }
        }