Skip to content

Port: play the cursor sound when the mouse moves a menu cursor - #109

Closed
carrdylan52 wants to merge 4 commits into
TheMoonPeople:masterfrom
carrdylan52:pr/mouse-cursor-sounds-port
Closed

carrdylan52 wants to merge 4 commits into
TheMoonPeople:masterfrom
carrdylan52:pr/mouse-cursor-sounds-port

Conversation

@carrdylan52

Copy link
Copy Markdown
Contributor

Depends on #108 (stacked on it; the diff shows its commit until it merges). The change here is the last commit.

Before: hover and the wheel moved several menu cursors silently (shop goods, bag and quantity board, the ITEM page's build-up list, the same index on another ITEM panel), and the fishing-rod stats sounded twice.
After: each real mouse cursor change plays the retail cursor sound exactly once, including at list ends and quantity limits.
How: MenuMouseCursorSound plays SYSTEM_SE_CURSOR at most once a tick for cursors the adapters set themselves; moves the retail step already sounds (synthesized directions, MenuMouseMove, the post-hook cursor check) stay retail's. The shop predicts whether the retail press it sends will move (RetailMoves) and sounds its own change only when it won't. A PORT_OVERRIDE MenuSePlay(int) keeps the retail body and counts sounds for tests. PC SETTINGS rows stay silent, as with the keyboard.
Tests: sound-count cases in the shop, item, world map and menu tests, including limits and pane switches.

A notch over the bag moved the cursor a row while the board stayed put, so
with the pointer on the top row the selection and its Sell price popup
walked away from it. A goods list or bag longer than its window now
scrolls one row per notch through the retail eased scroll (MenuMouseScroll
for the list, the ITEM page's ScrollTop and WheelTarget for the bag), and
the cursor takes the entry that settles under the pointer. Rows sliding
out of the window can no longer be hovered, so a hover cannot scroll the
pane back. A list that fits still moves its cursor through the retail keys.
The wheel never enters an empty goods list, as retail keeps the bag in
front when stock runs out.
Hover and the wheel moved several menu cursors silently: shop goods, bag
and quantity board, the ITEM page's build-up list and the same index on
another ITEM panel. MenuMouseCursorSound plays SYSTEM_SE_CURSOR at most
once a tick from the adapters that set a cursor themselves, the world
map's area marks among them; paths where retail already sounds the move
(synthesized directions, MenuMouseMove, the post-hook cursor check) are
left to retail. In the shop, the adapter sounds its own pane or quantity
change only when the retail press it sends will not move, so each real
change sounds once, at limits too. The fishing-rod stats no longer sound
twice. PC SETTINGS rows stay silent, as with the keyboard.
millerscout added a commit to millerscout/ChronicleTwo that referenced this pull request Oct 18, 2026
ListHit initialises the list and board positions as master's
clang-tidy pass does for the code it replaces.
Adubbz added a commit that referenced this pull request Oct 18, 2026
@Adubbz Adubbz closed this Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants