Exemple #1
0
        /// <summary>Called when a mouse button has been released again</summary>
        /// <param name="button">Index of the button that has been released</param>
        public void InjectMouseRelease(MouseButton button)
        {
            _heldMouseButtons &= ~button;

            // If a control signed responsible for the earlier mouse press, it will now
            // receive the release notification.
            _activatedControl?.ProcessMouseRelease(button);

            // Reset the activated control if the user has released all buttons on all
            // input devices.
            if (!AnyKeysOrButtonsPressed)
            {
                _activatedControl = null;
            }
        }