Example #1
0
 private void ButtonDownEvent( object sender, MouseEventArgs e )
 {
     if ( e.Button.HasFlag ( MouseButtons.Left ) )
         MouseButton |= MouseButton.Left;
     if ( e.Button.HasFlag ( MouseButtons.Right ) )
         MouseButton |= MouseButton.Right;
     if ( e.Button.HasFlag ( MouseButtons.Middle ) )
         MouseButton |= MouseButton.Middle;
     Position = new Daramkun.Misty.Mathematics.Vector2 ( e.X, e.Y );
     buttonEvent.MouseState = GetState ();
     RunMouseDown ( buttonEvent );
 }
Example #2
0
 private void WheelEvent( object sender, MouseEventArgs e )
 {
     Wheel = e.Delta / 120.0f;
     Position = new Daramkun.Misty.Mathematics.Vector2 ( e.X, e.Y );
     wheelEvent.Wheel = Wheel;
     RunMouseWheel ( wheelEvent );
 }
Example #3
0
 private void MoveEvent( object sender, MouseEventArgs e )
 {
     Position = new Daramkun.Misty.Mathematics.Vector2 ( e.X, e.Y );
     if ( IsCursorBlocked )
     {
         Form w = window.Handle as Form;
         Position -= new Mathematics.Vector2 ( w.Bounds.Left + ( w.Bounds.Width / 2 ), w.Bounds.Top + ( w.Bounds.Height / 2 ) );
         Cursor.Position = new System.Drawing.Point ( w.Bounds.Left + ( w.Bounds.Width / 2 ), w.Bounds.Top + ( w.Bounds.Height / 2 ) );
     }
     buttonEvent.MouseState = GetState ();
     RunMouseMove ( buttonEvent );
 }
Example #4
0
 void Mouse_ButtonDown( object sender, OpenTK.Input.MouseButtonEventArgs e )
 {
     if ( e.Button.HasFlag ( OpenTK.Input.MouseButton.Left ) )
         MouseButton |= MouseButton.Left;
     if ( e.Button.HasFlag ( OpenTK.Input.MouseButton.Right ) )
         MouseButton |= MouseButton.Right;
     if ( e.Button.HasFlag ( OpenTK.Input.MouseButton.Middle ) )
         MouseButton |= MouseButton.Middle;
     Position = new Daramkun.Misty.Mathematics.Vector2 ( e.X, e.Y );
     buttonEvent.MouseState = GetState ();
     RunMouseDown ( buttonEvent );
 }
Example #5
0
 void Mouse_WheelChanged( object sender, OpenTK.Input.MouseWheelEventArgs e )
 {
     Wheel = e.DeltaPrecise;
     Position = new Daramkun.Misty.Mathematics.Vector2 ( e.X, e.Y );
     wheelEvent.Wheel = Wheel;
     RunMouseWheel ( wheelEvent );
 }
Example #6
0
 void Mouse_Move( object sender, OpenTK.Input.MouseMoveEventArgs e )
 {
     Position = new Daramkun.Misty.Mathematics.Vector2 ( e.X, e.Y );
     if ( IsCursorBlocked )
     {
         Position -= new Mathematics.Vector2 ( w.Bounds.Left + ( w.Bounds.Width / 2 ), w.Bounds.Top + ( w.Bounds.Height / 2 ) );
         Cursor.Position = new Point ( w.Bounds.Left + ( w.Bounds.Width / 2 ), w.Bounds.Top + ( w.Bounds.Height / 2 ) );
     }
     buttonEvent.MouseState = GetState ();
     RunMouseMove ( buttonEvent );
 }
Example #7
0
 private void MoveEvent( object sender, MouseEventArgs e )
 {
     Position = new Daramkun.Misty.Mathematics.Vector2 ( e.X, e.Y );
     buttonEvent.MouseState = GetState ();
     RunMouseMove ( buttonEvent );
 }