Exemplo n.º 1
0
 internal void ForceReleaseButtons()
 {
     foreach (var button in DownButtons.ToArray())
     {
         MouseState.HandleButtonUp(button);
     }
 }
Exemplo n.º 2
0
        private void OnLostMouseCapture(object sender, EventArgs args)
        {
            var buttonsToRelease = DownButtons.ToArray();

            foreach (var button in buttonsToRelease)
            {
                MouseState.HandleButtonUp(button);
            }
        }
Exemplo n.º 3
0
        private void OnMouseInputEvent(SDL.SDL_MouseButtonEvent e)
        {
            MouseButton button = ConvertMouseButton(e.button);

            if (e.type == SDL.SDL_EventType.SDL_MOUSEBUTTONDOWN)
            {
                MouseState.HandleButtonDown(button);
            }
            else
            {
                MouseState.HandleButtonUp(button);
            }
        }
Exemplo n.º 4
0
        private void OnMouseInputEvent(Silk.NET.SDL.MouseButtonEvent e)
        {
            MouseButton button = ConvertMouseButton(e.Button);

            if ((EventType)e.Type == EventType.Mousebuttondown)
            {
                MouseState.HandleButtonDown(button);
            }
            else
            {
                MouseState.HandleButtonUp(button);
            }
        }
Exemplo n.º 5
0
 private void OnMouseUp(object sender, MouseEventArgs mouseEventArgs)
 {
     MouseState.HandleButtonUp(ConvertMouseButton(mouseEventArgs.Button));
 }