private void UpdateMouseButtons() { LeftButton = LeftButton.UpdateOnNativePressing(currentState.Buttons[0]); RightButton = RightButton.UpdateOnNativePressing(currentState.Buttons[1]); MiddleButton = MiddleButton.UpdateOnNativePressing(currentState.Buttons[2]); X1Button = X1Button.UpdateOnNativePressing(currentState.Buttons[3]); X2Button = X2Button.UpdateOnNativePressing(currentState.Buttons[4]); }
private void UpdateButtonStates(ref MouseState newState) { LeftButton = LeftButton.UpdateOnNativePressing(newState.LeftButton == ButtonState.Pressed); MiddleButton = MiddleButton.UpdateOnNativePressing(newState.MiddleButton == ButtonState.Pressed); RightButton = RightButton.UpdateOnNativePressing(newState.RightButton == ButtonState.Pressed); X1Button = X1Button.UpdateOnNativePressing(newState.XButton1 == ButtonState.Pressed); X2Button = X2Button.UpdateOnNativePressing(newState.XButton2 == ButtonState.Pressed); }