Esempio n. 1
0
        /// <summary>Called when a mouse button has been pressed down</summary>
        /// <param name="button">Index of the button that has been pressed</param>
        public void InjectMousePress(MouseButton button)
        {
            _heldMouseButtons |= button;

            // If a control is activated, it will receive any input notifications
            if (_activatedControl != null)
            {
                _activatedControl.ProcessMousePress(button);
                return;
            }

            // No control was activated, so the desktop control becomes activated and
            // is responsible for routing the input to the control under the mouse.
            _activatedControl = _desktopControl;
            _desktopControl.ProcessMousePress(button);
        }