[PR #156] [MERGED] Fix classic options scroll limits #2362

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/156
Author: @rdbtCVS
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @ludovic111

Base: main ← Head: t3code/fix-classic-ui-scroll-limit


📝 Commits (1)

  • 318988d Fix classic options scrolling at list boundaries

📊 Changes

3 files changed (+184 additions, -25 deletions)

View changed files

📝 crates/horizon-client/src/game/options.rs (+4 -1)
📝 crates/horizon-client/src/graphics_ui.rs (+68 -8)
📝 crates/horizon-client/src/options_ui.rs (+112 -16)

📄 Description

Classic options lists could draw a frame beyond their scroll limit and then snap back because row positions were calculated before the offset was clamped. Clamp wheel input against the current list and window size so scrolling stops immediately at either boundary, including the Simple and Advanced graphics screens.

Keep row positions consistent with the clamped offset after resizing, language centering, or filtering. Add regression coverage for repeated boundary input, reversing direction, lists without overflow, and changes to list bounds.

Validation:

  • All 425 horizon-client library tests pass.
  • cargo check --locked -p horizon-client --all-targets --quiet passes.
  • Formatting and git diff --check pass.
  • Clippy is blocked by existing unrelated lint errors in horizon-world and client mob AI.

Interactive validation of this branch's compiled client, running Classic style on an isolated X11 display with the prepared game resources and NVIDIA Vulkan renderer:

  • Sent real mouse-wheel events to Key Binds and Simple/Advanced Graphics at both limits. Recorded 180 frames at 60 fps for each of the six boundary cases; text positions stayed identical across all 1,080 frames during continued wheel input.
  • One reverse wheel step moved each overflowing list immediately.
  • Resized Key Binds between 1280x720 and 800x500, and Simple Graphics between 480x180 and 1280x720; inspected row positions and scrolling after each resize.
  • Font Settings and restored Simple Graphics stayed still when their content fit the viewport.
  • Inspected Language search filtering to an empty list. These prepared resources expose English only, so language-list overflow remains covered by the regression tests.

🔄 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/156 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3code/fix-classic-ui-scroll-limit` --- ### 📝 Commits (1) - [`318988d`](https://github.com/horizon-rust/horizon/commit/318988d7679f0ced29a0880b298772d0690571cc) Fix classic options scrolling at list boundaries ### 📊 Changes **3 files changed** (+184 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/options.rs` (+4 -1) 📝 `crates/horizon-client/src/graphics_ui.rs` (+68 -8) 📝 `crates/horizon-client/src/options_ui.rs` (+112 -16) </details> ### 📄 Description Classic options lists could draw a frame beyond their scroll limit and then snap back because row positions were calculated before the offset was clamped. Clamp wheel input against the current list and window size so scrolling stops immediately at either boundary, including the Simple and Advanced graphics screens. Keep row positions consistent with the clamped offset after resizing, language centering, or filtering. Add regression coverage for repeated boundary input, reversing direction, lists without overflow, and changes to list bounds. Validation: - All 425 horizon-client library tests pass. - `cargo check --locked -p horizon-client --all-targets --quiet` passes. - Formatting and `git diff --check` pass. - Clippy is blocked by existing unrelated lint errors in horizon-world and client mob AI. Interactive validation of this branch's compiled client, running Classic style on an isolated X11 display with the prepared game resources and NVIDIA Vulkan renderer: - Sent real mouse-wheel events to Key Binds and Simple/Advanced Graphics at both limits. Recorded 180 frames at 60 fps for each of the six boundary cases; text positions stayed identical across all 1,080 frames during continued wheel input. - One reverse wheel step moved each overflowing list immediately. - Resized Key Binds between 1280x720 and 800x500, and Simple Graphics between 480x180 and 1280x720; inspected row positions and scrolling after each resize. - Font Settings and restored Simple Graphics stayed still when their content fit the viewport. - Inspected Language search filtering to an empty list. These prepared resources expose English only, so language-list overflow remains covered by the regression tests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:55:20 +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#2362
No description provided.