void _inputService_MouseMove(object sender, MouseStateEventArgs e) { if (_inputService.IsMouseDown(MouseButton.Left)) { _camera.Position += e.PositionDelta; } }
internal void OnMouseStateChanged(object sender, MouseStateEventArgs e) { if (!e.Cancel) { mouseState = e.NewState; // TODO System.Diagnostics.Debug.WriteLine("MineView.MouseState = " + mouseState); } }
private void UpdateMouseState(MouseState newMouseState) { if (currentState != newMouseState) { BindModifiers modifiersNow = GetCurrentBindModifiers(); foreach (BindModifiers mod in stubbornStates.GetOrEmpty(currentState)) { if (modifiersNow.Applies(mod)) { return; } } MouseStateEventArgs e = new MouseStateEventArgs(newMouseState, currentState, modifiersNow); this.MouseStateChanged?.Invoke(this, e); if (!e.Cancel) { currentState = newMouseState; } } }
/// <summary>Invokes the mouse state changed event.</summary> /// <param name="e">The event args.</param> protected virtual void OnMouseStateChanged(MouseStateEventArgs e) { Invalidate(); MouseStateChanged?.Invoke(e); }
/// <summary>Invokes the mouse state changed event.</summary> /// <param name="sender">The sender.</param> /// <param name="e">The event args.</param> protected virtual void OnMouseStateChanged(object sender, MouseStateEventArgs e) { Invalidate(); MouseStateChanged?.Invoke(sender, e); }
private void OnMouseMove(object sender, MouseStateEventArgs e) { }
private void OnMouseLeftDown(object sender, MouseStateEventArgs e) { }