private void OnMouseMove(object sender, RawInputMouseEventArgs e) { if (isPositionLocked && e.isRelative) { MouseState.HandleMouseDelta(new Vector2(e.X, e.Y)); } }
private void OnMouseEvent(object sender, RawInputMouseEventArgs e) { MouseEvent = e; MouseCount = _rawInput.NumberOfMice; Style active = this.FindResource("ActiveStyle") as Style; Style normal = this.FindResource("NormalStyle") as Style; m1Button.Style = e.ButtonFlags == (ushort)MouseClickState.Mouse1Down ? active : normal; m2Button.Style = e.ButtonFlags == (ushort)MouseClickState.Mouse2Down ? active : normal; m3Button.Style = e.ButtonFlags == (ushort)MouseClickState.Mouse3Down ? active : normal; m4Button.Style = e.ButtonFlags == (ushort)MouseClickState.Mouse4Down ? active : normal; m5Button.Style = e.ButtonFlags == (ushort)MouseClickState.Mouse5Down ? active : normal; e.Handled = (ShouldHandleMouse.IsChecked == true); }