WIP: Draw mouse button and wheel icons in keyboard prompts #472

Draft
FORLE wants to merge 2 commits from FORLE/Darner:contrib/darner-mouse-button-prompts into Main
First-time contributor

Not yet tested in game; opening as a draft for a visual check.

Contributor role (optional)

  • Fluxer ID: not provided.

What it changes

  • On main (confirmed in code), single-button prompts show LMB/RMB/MMB as text, and wheel bindings can fall back to a controller icon.
  • Draw original vector icons for left, right and middle mouse buttons and wheel up/down. Keep the first displayable binding and retain text for combined prompts. Input handling is unchanged.

How it was tested

  • Tested revision: d734197, based on d91d8e4.
  • cargo test -p darner-game --locked prompts::: 62 passed. The built darner-hle test binary passed all 7 modules::gameinput::mnk::tests:: cases. cargo xtask policy --staged: four files passed.
  • Changes a default: yes, the visual prompts for these bindings when keyboard prompts are enabled. In-game A/B pending; no performance claim.
  • Gates: both workspace Clippy gates passed. cargo test --workspace --locked failed on two GPU tests: the DXC HLSL test also fails on clean d91d8e4 (0x80004005); the reservation-splitting watch test passed when rerun alone on both revisions.
  • Gameplay: not run on this revision. Visual legibility and in-game display of wheel prompts still need checking.
  • Shader wave sizes: not applicable. Hardware dependence: not tested across setups.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #353 (host font fallback), #364 (keyboard binding and label semantics), #402 (native mouse sensitivity), #405 (native wheel and extra mouse button input), and #429 (hold bindings; also touches prompt rendering).
  • Replaces or overlaps: no duplicate found. #405 handles wheel input; this PR only draws its prompt.
Not yet tested in game; opening as a draft for a visual check. ## Contributor role (optional) - Fluxer ID: not provided. ## What it changes - On main (confirmed in code), single-button prompts show LMB/RMB/MMB as text, and wheel bindings can fall back to a controller icon. - Draw original vector icons for left, right and middle mouse buttons and wheel up/down. Keep the first displayable binding and retain text for combined prompts. Input handling is unchanged. ## How it was tested - Tested revision: `d734197`, based on `d91d8e4`. - `cargo test -p darner-game --locked prompts::`: 62 passed. The built `darner-hle` test binary passed all 7 `modules::gameinput::mnk::tests::` cases. `cargo xtask policy --staged`: four files passed. - Changes a default: yes, the visual prompts for these bindings when keyboard prompts are enabled. In-game A/B pending; no performance claim. - Gates: both workspace Clippy gates passed. `cargo test --workspace --locked` failed on two GPU tests: the DXC HLSL test also fails on clean `d91d8e4` (`0x80004005`); the reservation-splitting watch test passed when rerun alone on both revisions. - Gameplay: not run on this revision. Visual legibility and in-game display of wheel prompts still need checking. - Shader wave sizes: not applicable. Hardware dependence: not tested across setups. ## Checklist - [ ] I ran this change in the game, or say below why it can't be (docs, tests only). - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #353 (host font fallback), #364 (keyboard binding and label semantics), #402 (native mouse sensitivity), #405 (native wheel and extra mouse button input), and #429 (hold bindings; also touches prompt rendering). - Replaces or overlaps: no duplicate found. #405 handles wheel input; this PR only draws its prompt.
Contributor

I rasterized the five mouse prompts from the vectors generated by d7341970e8a92e26b169115c257305c18c3c876f, using the project's synthetic prompt movie. I checked 12, 16, 20, 24 and 32 px cells.

Left and Right are mirror images, and Middle has a distinct wheel mark. All five icons remained distinct at every size in both the coverage raster and Windows GDI+. Wheel Up and Wheel Down are hardest to read at 12 px: the triangle is 3.54 px wide and 2.25 px high. Only two pixels differ by at least 64 gray levels at integer alignment, compared with 16 pixels at 24 px. Both directions are much easier to recognize at 24 and 32 px.

Cell size 12 px 16 px 20 px 24 px 32 px
Pixels differing by at least 64/255 between Wheel Up and Wheel Down 2 6 14 16 28

In the synthetic movie, moving a binding to a different control moved the corresponding pictogram with it. Putting E first kept the E cap. Mouse4 and Mouse5 still rendered as M4 and M5 text caps.

These are offscreen results. The in-game HUD scale, compositing and live wheel input still need checking.

I rasterized the five mouse prompts from the vectors generated by `d7341970e8a92e26b169115c257305c18c3c876f`, using the project's synthetic prompt movie. I checked 12, 16, 20, 24 and 32 px cells. Left and Right are mirror images, and Middle has a distinct wheel mark. All five icons remained distinct at every size in both the coverage raster and Windows GDI+. Wheel Up and Wheel Down are hardest to read at 12 px: the triangle is 3.54 px wide and 2.25 px high. Only two pixels differ by at least 64 gray levels at integer alignment, compared with 16 pixels at 24 px. Both directions are much easier to recognize at 24 and 32 px. | Cell size | 12 px | 16 px | 20 px | 24 px | 32 px | | --- | ---: | ---: | ---: | ---: | ---: | | Pixels differing by at least 64/255 between Wheel Up and Wheel Down | 2 | 6 | 14 | 16 | 28 | In the synthetic movie, moving a binding to a different control moved the corresponding pictogram with it. Putting E first kept the E cap. Mouse4 and Mouse5 still rendered as M4 and M5 text caps. These are offscreen results. The in-game HUD scale, compositing and live wheel input still need checking.
TrustNo1 changed title from WIP: [pr-feature][input] Draw mouse button and wheel icons in keyboard prompts to WIP: Draw mouse button and wheel icons in keyboard prompts 2026-12-06 03:28:21 +00:00
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'contrib/darner-mouse-button-prompts:FORLE-contrib/darner-mouse-button-prompts'
git switch 'FORLE-contrib/darner-mouse-button-prompts'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'Main'
git merge --no-ff 'FORLE-contrib/darner-mouse-button-prompts'
git switch 'FORLE-contrib/darner-mouse-button-prompts'
git rebase 'Main'
git switch 'Main'
git merge --ff-only 'FORLE-contrib/darner-mouse-button-prompts'
git switch 'FORLE-contrib/darner-mouse-button-prompts'
git rebase 'Main'
git switch 'Main'
git merge --no-ff 'FORLE-contrib/darner-mouse-button-prompts'
git switch 'Main'
git merge --squash 'FORLE-contrib/darner-mouse-button-prompts'
git switch 'Main'
git merge --ff-only 'FORLE-contrib/darner-mouse-button-prompts'
git switch 'Main'
git merge 'FORLE-contrib/darner-mouse-button-prompts'
git push origin 'Main'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!472
No description provided.