public override void Update() { if (InputManager.IsMouseScrollUp) { ScrollState = MouseScrollState.Up; } else if (InputManager.IsMouseScrollDown) { ScrollState = MouseScrollState.Down; } else if (InputManager.IsMouseScrollIdle) { ScrollState = MouseScrollState.Idle; } base.Update(); }
public void MouseScrollInput(MouseState mouseState) { mousePos.X = mouseState.X; mousePos.Y = mouseState.Y; mouseScrollState = MouseScrollState.NONE; if (mouseState.ScrollWheelValue < previousScrollValue) { mouseScrollState = MouseScrollState.SCROLLUP; } else if (mouseState.ScrollWheelValue > previousScrollValue) { mouseScrollState = MouseScrollState.SCROLLDOWN; } scrollChangeValue = mouseState.ScrollWheelValue - previousScrollValue; previousScrollValue = mouseState.ScrollWheelValue; }