Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add horizonal scroll wheel support to Mouse #309

Open
walbourn opened this issue Mar 7, 2022 · 2 comments
Open

Add horizonal scroll wheel support to Mouse #309

walbourn opened this issue Mar 7, 2022 · 2 comments
Labels
enhancement input Related to GamePad, Keyboard, and Mouse

Comments

@walbourn
Copy link
Member

walbourn commented Mar 7, 2022

The original XNA Game Studio Mouse abstraction only exposed the vertical scroll wheel as most mice don't have the horizonal scroll wheel. The information, however, is exposed for Win32, UWP, and GameInput.

This work would likely modify Mouse::State to have 2 scroll wheel values:

struct State
{
...
    int     scrollWheelValueX;
    int     scrollWheelValueY;
...
};

This would be a minor breaking change.

And the reset method would be updated to:

// Resets the accumulated scroll wheel value
void __cdecl ResetScrollWheelValue(bool x=true, bool y=true) noexcept;

The Win32 integration would also require getting WM_MOUSEHWHEEL messages.

@walbourn walbourn added the input Related to GamePad, Keyboard, and Mouse label Mar 7, 2022
@walbourn
Copy link
Member Author

walbourn commented Mar 7, 2022

In the meantime, I did fix a bug where the UWP Mouse implementation would combine both the X and Y wheels together. This is fixed in this commit.

@walbourn
Copy link
Member Author

walbourn commented Mar 8, 2022

Prototyped in this branch, but needs more testing https://github.com/microsoft/DirectXTK12/tree/mousehwheel

@walbourn walbourn self-assigned this Oct 17, 2022
@walbourn walbourn removed their assignment Nov 5, 2022
@walbourn walbourn pinned this issue Dec 11, 2022
@walbourn walbourn unpinned this issue Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement input Related to GamePad, Keyboard, and Mouse
Projects
None yet
Development

No branches or pull requests

1 participant