[PR #303] [MERGED] World list and pack lists: vanilla scroller, dragged with the pointer #2472

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

📋 Pull Request Information

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

Base: main ← Head: feat/list-scrollbars


📝 Commits (3)

  • 6953710 Blur the panorama behind the title menus' screens, as vanilla does (#282)
  • 587695e Multiplayer: vanilla's server list, with the LAN scanning header and its dots (#282)
  • a8bd497 World list and pack lists: vanilla scroller, dragged with the pointer

📊 Changes

12 files changed (+1002 additions, -223 deletions)

View changed files

📝 crates/horizon-client/src/front.rs (+1 -0)
📝 crates/horizon-client/src/game.rs (+27 -0)
📝 crates/horizon-client/src/gfx.rs (+23 -0)
📝 crates/horizon-client/src/lib.rs (+1 -0)
➕ crates/horizon-client/src/menu_blur.rs (+249 -0)
➕ crates/horizon-client/src/menu_blur.wgsl (+32 -0)
📝 crates/horizon-client/src/multiplayer.rs (+424 -151)
📝 crates/horizon-client/src/options_ui.rs (+8 -1)
📝 crates/horizon-client/src/pack_screen.rs (+38 -1)
📝 crates/horizon-client/src/title.rs (+92 -69)
📝 crates/horizon-client/src/title/tests.rs (+24 -1)
📝 crates/horizon-client/src/ui.rs (+83 -0)

📄 Description

Thanks to Cosmic (@Online5277) for #282: Horizon's world list had a flat grey bar for a scrollbar that couldn't be dragged, and the list sat a pixel off vanilla's.

Stacked on #301 (multiplayer / ui::Scroll), which is stacked on #299 (blur). Merge those first.

What (vanilla 26.3 SelectWorldScreen + WorldSelectionList, AbstractScrollArea)

  • World list geometry: HeaderAndFooterLayout(8 + 9 + 8 + 20 + 4 = 49, 60), so the list runs 49..h−60 (was 48..h−58). Rows are 270 wide, start 2 pixels below the list top with their content 2 pixels in, and are clipped to the list. Click hit-testing uses the same geometry.
  • Look: menu_list_background, then the rows, then the header and footer separators over them. The selection is a white outline around black, as when the list has focus; it was grey.
  • Scroller: the widget/scroller_background and widget/scroller sprites at the rows' right + 8, sized clamp(h² / content, 32, h − 8) with content = rows·36 + 4. This replaces the hand-filled bar.
  • Scrolling: the wheel moves half a row per step (ui::Scroll::wheel). Pressing the scroller column holds it, and it follows the pointer with vanilla's max / (height − bar) drag scale; above or below the list it jumps to an end, and it lets go on release. A press elsewhere on the column doesn't jump: vanilla's updateScrolling only starts the drag.
  • Pack screen: both pack lists' scrollers can now be dragged too (TransferableSelectionList is an AbstractSelectionList). The options lists already were, from Cosmic's #257.

With #299 and #301, this covers every #282 item. (d) needs no change: rdbtCVS's #219 already brought back vanilla's SplashManager (resource splashes, holiday splashes, the hidden splash dropped, the hide-splash option).

Screenshots (Horizon, offscreen on the Mac mini, GUI scale 3, synthetic panorama as in #299)

  • world-select.png: nine worlds with the second selected; white outline, scroller at the top of its track, separators over the rows.
  • packs.png: the resource pack screen with the vanilla lists.

Self-check

cargo fmt --all -- --check                                   ok
cargo clippy -p horizon-client --all-targets -- -D warnings  ok
cargo test -p horizon-client                                  ok (633 lib + integration)
  new: title::tests::scrolled_world_list_draws_inside_the_list_and_drags_its_scroller
parity harnesses (tools/parity.py --changed origin/main, once on the stack tip dc863a66 = #299+#301+#303+#304)
                                             79 passed; light first hit a port already in use by another session's server, passed on rerun

Fixes #282

🤖 Generated with Claude Code


🔄 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/303 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/list-scrollbars` --- ### 📝 Commits (3) - [`6953710`](https://github.com/horizon-rust/horizon/commit/6953710c74fccbde4c7d928c3a577d11e3501610) Blur the panorama behind the title menus' screens, as vanilla does (#282) - [`587695e`](https://github.com/horizon-rust/horizon/commit/587695e108d4fc21f5922ef7518613552a6649ea) Multiplayer: vanilla's server list, with the LAN scanning header and its dots (#282) - [`a8bd497`](https://github.com/horizon-rust/horizon/commit/a8bd497132388f045874beb4486fbb8f07c83791) World list and pack lists: vanilla scroller, dragged with the pointer ### 📊 Changes **12 files changed** (+1002 additions, -223 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/front.rs` (+1 -0) 📝 `crates/horizon-client/src/game.rs` (+27 -0) 📝 `crates/horizon-client/src/gfx.rs` (+23 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) ➕ `crates/horizon-client/src/menu_blur.rs` (+249 -0) ➕ `crates/horizon-client/src/menu_blur.wgsl` (+32 -0) 📝 `crates/horizon-client/src/multiplayer.rs` (+424 -151) 📝 `crates/horizon-client/src/options_ui.rs` (+8 -1) 📝 `crates/horizon-client/src/pack_screen.rs` (+38 -1) 📝 `crates/horizon-client/src/title.rs` (+92 -69) 📝 `crates/horizon-client/src/title/tests.rs` (+24 -1) 📝 `crates/horizon-client/src/ui.rs` (+83 -0) </details> ### 📄 Description Thanks to **Cosmic (@Online5277)** for #282: Horizon's world list had a flat grey bar for a scrollbar that couldn't be dragged, and the list sat a pixel off vanilla's. Stacked on #301 (multiplayer / `ui::Scroll`), which is stacked on #299 (blur). Merge those first. ## What (vanilla 26.3 `SelectWorldScreen` + `WorldSelectionList`, `AbstractScrollArea`) - **World list geometry:** `HeaderAndFooterLayout(8 + 9 + 8 + 20 + 4 = 49, 60)`, so the list runs 49..h−60 (was 48..h−58). Rows are 270 wide, start 2 pixels below the list top with their content 2 pixels in, and are clipped to the list. Click hit-testing uses the same geometry. - **Look:** `menu_list_background`, then the rows, then the header and footer separators over them. The selection is a white outline around black, as when the list has focus; it was grey. - **Scroller:** the `widget/scroller_background` and `widget/scroller` sprites at the rows' right + 8, sized `clamp(h² / content, 32, h − 8)` with content = rows·36 + 4. This replaces the hand-filled bar. - **Scrolling:** the wheel moves half a row per step (`ui::Scroll::wheel`). Pressing the scroller column holds it, and it follows the pointer with vanilla's `max / (height − bar)` drag scale; above or below the list it jumps to an end, and it lets go on release. A press elsewhere on the column doesn't jump: vanilla's `updateScrolling` only starts the drag. - **Pack screen:** both pack lists' scrollers can now be dragged too (`TransferableSelectionList` is an `AbstractSelectionList`). The options lists already were, from Cosmic's #257. With #299 and #301, this covers every #282 item. (d) needs no change: rdbtCVS's #219 already brought back vanilla's `SplashManager` (resource splashes, holiday splashes, the hidden splash dropped, the hide-splash option). ## Screenshots (Horizon, offscreen on the Mac mini, GUI scale 3, synthetic panorama as in #299) - `world-select.png`: nine worlds with the second selected; white outline, scroller at the top of its track, separators over the rows. - `packs.png`: the resource pack screen with the vanilla lists. ## Self-check ``` cargo fmt --all -- --check ok cargo clippy -p horizon-client --all-targets -- -D warnings ok cargo test -p horizon-client ok (633 lib + integration) new: title::tests::scrolled_world_list_draws_inside_the_list_and_drags_its_scroller parity harnesses (tools/parity.py --changed origin/main, once on the stack tip dc863a66 = #299+#301+#303+#304) 79 passed; light first hit a port already in use by another session's server, passed on rerun ``` Fixes #282 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:56:28 +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#2472
No description provided.