1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 02:49:53 +08:00
Files
osu-lazer/osu.Game/Graphics
T
Linus Genz 033e13cb3b Fix song select navigation with page up/down (#36293)
Resolves #36099 

This PR fixes keyboard navigation in the beatmap select carousel for
lazer by implementing page-wise traversal with the Page Up and Page Down
keys and changing it from only scrolling to actually selecting items.

**Changes:**
- Added handling for `TraversalType.Page` in the keyboard traversal
switch.
- Implemented `traverseKeyboardPage(int direction)` method to move the
selection by approximately one "page" of visible items, accounting for
partially obscured items like the search bar. Also it does not wrap
around (like the current PageUp/Down functionality).
- Added new key bindings:
    - `PageUp` → SelectPreviousPage
    - `PageDown` → SelectNextPage

The code may be very explicit for the scroll logic with the page keys,
so I would appreciate some feedback when the PR is reviewed.
The naming of the keybinds may need to be adjusted. `Next page` and
`previous page` may be somewhat misleading.

**Behavior after the change:**
- Pressing Page Up/Down now moves the selection by a page of items.
- After navigating, pressing Left/Right selects the navigated song
instead of moving relative to the previous position.

**See:**
https://www.youtube.com/watch?v=JXmKAhhKiCc

---------

Signed-off-by: Linus Genz <linuslinuxgenz@gmail.com>
Co-authored-by: Dean Herbert <pe@ppy.sh>
033e13cb3b · 2026-03-02 02:08:19 +09:00
History
..
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2025-10-29 11:51:31 +01:00
2023-06-24 01:00:03 +09:00
2025-04-11 20:13:53 +09:00
2025-12-18 04:08:16 -05:00
2023-06-24 01:00:03 +09:00
2024-07-03 00:19:04 +09:00