Share via


GameInputMouseState (v1)

Describes the state of a mouse.

Syntax

struct GameInputMouseState
{
    GameInputMouseButtons   buttons;
    GameInputMousePositions positions;
    int64_t                 positionX;
    int64_t                 positionY;
    int64_t                 absolutePositionX;
    int64_t                 absolutePositionY;
    int64_t                 wheelX;
    int64_t                 wheelY;
};

Members

buttons Type: GameInputMouseButtons

State of the mouse buttons.

positionFlags Type: GameInputMousePosition

State of the mouse positions.

positionX Type: int64_t

Cumulative x-axis change in the position of the mouse.

positionY Type: int64_t

Cumulative y-axis change in the position of the mouse.

absolutePositionX Type: int64_t

Absolute x-axis position of the mouse.

absolutePositionY Type: int64_t

Absolute y-axis position of the mouse.

wheelX Type: int64_t

Cumulative change in the x-axis scroll wheel.

wheelY Type: int64_t

Cumulative change in the y-axis scroll wheel.

Remarks

This structure is used by the IGameInputReading::GetMouseState method.

Mouse and scroll-wheel movements are not reported as absolute positions. Calculate deltas by subtracting the values in the current reading from the values in the previous reading.

GameInput will present any available trackpad devices as a single virtual mouse device.

For more information, see GameInput readings.

Requirements

Header: GameInput.h

Supported platforms: Windows

See also

Overview of GameInput GameInput