[PR #783] [MERGED] Fix Horizon options scrollbar dragging #2808

Closed
opened 2026-11-02 15:59:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/783
Author: @LookImEcho-Rick
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @ludovic111

Base: main ← Head: codex/issue-730-horizon-scrollbar


📝 Commits (1)

  • d33929c Fix Horizon options scrollbar dragging

📊 Changes

2 files changed (+269 additions, -29 deletions)

View changed files

📝 crates/horizon-client/src/options_horizon.rs (+267 -28)
📝 crates/horizon-client/src/options_ui.rs (+2 -1)

📄 Description

What and why

Fixes #730.

Horizon-style options lists now capture a left-button press anywhere in the scrollbar column and scroll as the pointer moves. Dragging uses Horizon's transformed cursor coordinates, so the visible scrollbar remains clickable at scaled window sizes. Scrolling clamps to both ends and mouse release stops the drag.

The existing thin scrollbar appearance is preserved. Key rebinding consumes its mouse press before scrollbar capture; option sliders, mouse-wheel scrolling, and Classic menus retain their existing input paths.

Regression coverage exercises the Controls scrollbar at 2560x1440, dragging outside the scrollbar column, both scroll bounds, release, and mouse rebinding precedence.

Vanilla reference

Minecraft Java 26.3 AbstractSelectionList inherits scrolling behavior from AbstractScrollArea. Inspected the pinned client with REA 6.4.0 and followed AbstractScrollArea.updateScrolling, mouseDragged, and onRelease; the existing Classic implementation in options_ui.rs is the local reference. This changes Horizon's menu interaction, with focused Rust regression tests rather than a gameplay parity harness.

Self-check

python tools/pr_ready.py --base origin/main cannot start on this Windows host: importing tools/parity.py raises AttributeError: module 'os' has no attribute 'uname'. The self-check also requires Bash, which is unavailable here. The following equivalent checks were run directly:

Check Result
cargo fmt --all -- --check Passed
cargo clippy --workspace --all-targets --locked -- -D warnings Passed
python tools/check_public_tree.py Passed
git diff origin/main --check Passed
cargo test --locked -p horizon-client --lib scrollbar -- --nocapture 6 passed
cargo test --locked -p horizon-client 830 passed, 4 failed, 11 ignored
cargo run --release -p horizon-client Built, loaded resources, rendered first frame

The full client suite failures are outside the changed menu modules and were also observed earlier in this task:

  • crash::tests::stacks_start_at_the_panicking_frame
  • gfx::sprite_upload_tests::blended_frames_round_like_f32_round
  • packs::cache::tests::directory_inputs_config_and_owned_output_recovery (Windows access denied)
  • save::tests::session_lock_is_exclusive (Windows file lock)

The branch is rebased onto origin/main at 437d5272. Formatting, Clippy, and the six scrollbar tests were checked after rebasing. No manifests or lockfiles changed. The pre-existing untracked tools/test_death_quit_save.py is excluded from the commit and its SHA-256 is unchanged.

Screenshots

No drawing or styling changes. The release client reached its first frame, but live Controls pointer interaction and screenshots could not be verified because the UI automation inventory did not expose the native client window.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/783 **Author:** [@LookImEcho-Rick](https://github.com/LookImEcho-Rick) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `codex/issue-730-horizon-scrollbar` --- ### 📝 Commits (1) - [`d33929c`](https://github.com/horizon-rust/horizon/commit/d33929c8fab6a73321efc4d713c54e423a355d3d) Fix Horizon options scrollbar dragging ### 📊 Changes **2 files changed** (+269 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/options_horizon.rs` (+267 -28) 📝 `crates/horizon-client/src/options_ui.rs` (+2 -1) </details> ### 📄 Description ## What and why Fixes #730. Horizon-style options lists now capture a left-button press anywhere in the scrollbar column and scroll as the pointer moves. Dragging uses Horizon's transformed cursor coordinates, so the visible scrollbar remains clickable at scaled window sizes. Scrolling clamps to both ends and mouse release stops the drag. The existing thin scrollbar appearance is preserved. Key rebinding consumes its mouse press before scrollbar capture; option sliders, mouse-wheel scrolling, and Classic menus retain their existing input paths. Regression coverage exercises the Controls scrollbar at 2560x1440, dragging outside the scrollbar column, both scroll bounds, release, and mouse rebinding precedence. ## Vanilla reference Minecraft Java 26.3 `AbstractSelectionList` inherits scrolling behavior from `AbstractScrollArea`. Inspected the pinned client with REA 6.4.0 and followed `AbstractScrollArea.updateScrolling`, `mouseDragged`, and `onRelease`; the existing Classic implementation in `options_ui.rs` is the local reference. This changes Horizon's menu interaction, with focused Rust regression tests rather than a gameplay parity harness. ## Self-check `python tools/pr_ready.py --base origin/main` cannot start on this Windows host: importing `tools/parity.py` raises `AttributeError: module 'os' has no attribute 'uname'`. The self-check also requires Bash, which is unavailable here. The following equivalent checks were run directly: | Check | Result | | --- | --- | | `cargo fmt --all -- --check` | Passed | | `cargo clippy --workspace --all-targets --locked -- -D warnings` | Passed | | `python tools/check_public_tree.py` | Passed | | `git diff origin/main --check` | Passed | | `cargo test --locked -p horizon-client --lib scrollbar -- --nocapture` | 6 passed | | `cargo test --locked -p horizon-client` | 830 passed, 4 failed, 11 ignored | | `cargo run --release -p horizon-client` | Built, loaded resources, rendered first frame | The full client suite failures are outside the changed menu modules and were also observed earlier in this task: - `crash::tests::stacks_start_at_the_panicking_frame` - `gfx::sprite_upload_tests::blended_frames_round_like_f32_round` - `packs::cache::tests::directory_inputs_config_and_owned_output_recovery` (Windows access denied) - `save::tests::session_lock_is_exclusive` (Windows file lock) The branch is rebased onto `origin/main` at `437d5272`. Formatting, Clippy, and the six scrollbar tests were checked after rebasing. No manifests or lockfiles changed. The pre-existing untracked `tools/test_death_quit_save.py` is excluded from the commit and its SHA-256 is unchanged. ## Screenshots No drawing or styling changes. The release client reached its first frame, but live Controls pointer interaction and screenshots could not be verified because the UI automation inventory did not expose the native client window. <!-- Enable "Allow edits by maintainers" when opening this pull request. No release label is needed for this fix. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:59:13 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
horizon-rust/horizon#2808
No description provided.