private static void ProcessMouseMotionEvent(Sdl2NativeWindow window, MouseMotionEvent ev) { float scale = window.ClientSize.Width / (float)window.Size.Width; window.OnMouseMove( (int)Math.Round(ev.X * scale), (int)Math.Round(ev.Y * scale)); Sdl2Mouse.Scale = scale; }
public override bool mouseMoved(MouseMotionEvent evt) { bool ret = BitesPINVOKE.CameraMan_mouseMoved(swigCPtr, MouseMotionEvent.getCPtr(evt)); if (BitesPINVOKE.SWIGPendingException.Pending) { throw BitesPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public virtual bool mouseMoved(MouseMotionEvent evt) { bool ret = (SwigDerivedClassHasMethod("mouseMoved", swigMethodTypes6) ? BitesPINVOKE.InputListener_mouseMovedSwigExplicitInputListener(swigCPtr, MouseMotionEvent.getCPtr(evt)) : BitesPINVOKE.InputListener_mouseMoved(swigCPtr, MouseMotionEvent.getCPtr(evt))); if (BitesPINVOKE.SWIGPendingException.Pending) { throw BitesPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private void OnMouseMoveEvent(MouseMotionEvent e) { if (IsPositionLocked) { MouseState.HandleMouseDelta(new Vector2(e.Xrel, e.Yrel)); } else { MouseState.HandleMove(new Vector2(e.X, e.Y)); } }
protected override void MouseMotion(MouseMotionEvent e) { mCameraTarget.Pitch(new Radian(-e.DeltaY * mDeltaTime * 500.0f)); mCameraTarget.Yaw(new Radian(-e.DeltaX * mDeltaTime * 500.0f)); if (e.DeltaZ > 0) { Vector3 initial = mCameraPosition.Position; Vector3 final = new Vector3(initial.x * 1.1f, initial.y * 1.1f, initial.z * 1.1f); Vector3 delta = Vector3.Subtract(initial, final); mCameraPosition.Translate(delta, Node.TransformSpace.TS_LOCAL); } if (e.DeltaZ < 0) { Vector3 initial = mCameraPosition.Position; Vector3 final = new Vector3(initial.x * 0.9f, initial.y * 0.9f, initial.z * 0.9f); Vector3 delta = Vector3.Subtract(initial, final); mCameraPosition.Translate(delta, Node.TransformSpace.TS_LOCAL); } }
private void handleButtonMouseMotionAction(MouseMotionEvent e) { if (this.HoverEnabled) { if (isInBounds(e.X, e.Y)) { imgState = MyButtonState.Hover; } else { imgState = MyButtonState.Idle; } } }
/// <summary> /// Called when the mouse moves while a mouse button is down. /// </summary> /// <param name="deltax"></param> /// <param name="deltay"></param> /// <param name="deltaz"></param> protected virtual void MouseDragged(MouseMotionEvent e) { this.MouseMotion(e); }
/// <summary> /// Called at the end of a rendering frame. /// </summary> /// <param name="deltax"></param> /// <param name="deltay"></param> /// <param name="deltaz"></param> protected virtual void MouseMotion(MouseMotionEvent e) { mCamera.Pitch(new Radian(-e.DeltaY * mDeltaTime * 500.0f)); mCamera.Yaw(new Radian(-e.DeltaX * mDeltaTime * 500.0f)); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MouseMotionEvent obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public override bool mouseMoved(MouseMotionEvent evt) { return(false); // propgate further; }
public void ProcessMouseEvent(MouseMotionEvent motion) { state.X += motion.Xrel; state.Y += motion.Yrel; }
protected override void MouseDragged(MouseMotionEvent e) { MouseMotion(e); }
public void handleDraggableMouseMotionEvent(MouseMotionEvent e) { if (Moving) { this.Bounds = new Rectangle(this.Bounds.X + e.DX, this.Bounds.Y + e.DY, this.Bounds.Width, this.Bounds.Height); } }
protected override void MouseMotion(MouseMotionEvent e) { GuiSystem.Instance.InjectMouseMove(e.DeltaX * mRenderWindow.Width, e.DeltaY * mRenderWindow.Height); }
protected override void MouseDragged(MouseMotionEvent e) { //base.MouseDragged (e); this.MouseMotion(e); }