Add horizonal scroll wheel support to Mouse

Open
#309 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
desktop

Research direction

Start with the Mouse::State and ResetScrollWheelValue declarations described in the issue, then trace the Win32, UWP, and GameInput integrations. Support separate horizontal and vertical values, handle WM_MOUSEHWHEEL on Win32, and ensure the reset method can reset either axis.

Written by the indexing model from the issue text.

Description

enhancement input

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.

Dominant language
C++
Stars
2.9k
Forks
538
Avg merge
3d 7h
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/DirectXTK

All issues in microsoft/DirectXTK

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.