[PR #301] [MERGED] Multiplayer: vanilla's server list, with the LAN scanning text and its animated dots #2470

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

📋 Pull Request Information

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

Base: main ← Head: feat/multiplayer-lan-scanning


📝 Commits (2)

  • 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)

📊 Changes

9 files changed (+863 additions, -158 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/title.rs (+23 -7)
📝 crates/horizon-client/src/ui.rs (+83 -0)

📄 Description

Thanks to Cosmic (@Online5277) for #282: with no saved servers, Horizon's multiplayer screen lacked vanilla's "Scanning for games on your local network" text and animation, and the rest of the screen didn't match either.

Stacked on #299 (blur); merge that first.

What (vanilla 26.3 JoinMultiplayerScreen + ServerSelectionList)

  • Layout: HeaderAndFooterLayout(33, 60). The title is centred in the 33-pixel header (y 12, was 8). The list runs from 33 to h−60 between the header and footer separators, with menu_list_background. The footer's two button rows are centred in 60 pixels with integer centring; labels come from the selectServer.* translations.
  • LAN header: the list always ends with LANHeader after the saved servers. Its LoadingDotsWidget draws lanServer.scanning centred on the row, with LoadingDotsText ("O o o", "o O o", "o o O", "o O o", 300 ms each) in grey on its last line. LAN games follow it (lanServer.title, MOTD, address). The old "No servers yet" line, which isn't vanilla, is gone.
  • Rows: 305 wide and 36 high, starting 2 pixels below the list top, content 2 pixels in, clipped to the list. The selection is a white outline around black (extractSelection, list focused). Saved servers show up to two MOTD lines and the player count left of the status icon: ping_1..5 by latency, unreachable (with "Can't connect to server" in vanilla's red), or the bouncing pinging_1..5. The address line under the MOTD, which vanilla doesn't draw, is gone.
  • Buttons: onSelectedChange rules: Join needs a server or LAN game selected; Edit and Delete need a saved server.
  • Scrolling: the list scrolls with the wheel (half a row per step) and a draggable scrollbar. The new ui::Scroll ports AbstractScrollArea's amount, mouseScrolled, updateScrolling, mouseDragged (pointer outside the list jumps to an end, with the max / (height − bar) drag scale) and onRelease. Before, the list couldn't scroll at all and rows past the bottom were dropped. The next PR reuses ui::Scroll for the world list.

Not in this PR: the hover overlays on the server icon (join, move up/down sprites), server favicons and the confirm-delete screen.

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

  1. No saved servers: the title, the empty list with the scanning text and the dots, the six buttons.
  2. Eight unreachable saved servers, the second selected: white outline, red "Can't connect to server", the unreachable icons, the vanilla scroller on the right; Join, Edit and Delete enabled.

Self-check

cargo fmt --all -- --check                                   ok
cargo clippy --workspace --all-targets -- -D warnings        ok
cargo test -p horizon-client --lib multiplayer::tests ui::tests   ok (30)
  new: multiplayer::tests (LAN header after the servers, row geometry and scrolling, LoadingDotsText frames)
       ui::tests::held_scrollbars_follow_the_pointer_and_stop_at_the_ends
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

Part of #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/301 **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/multiplayer-lan-scanning` --- ### 📝 Commits (2) - [`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) ### 📊 Changes **9 files changed** (+863 additions, -158 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/title.rs` (+23 -7) 📝 `crates/horizon-client/src/ui.rs` (+83 -0) </details> ### 📄 Description Thanks to **Cosmic (@Online5277)** for #282: with no saved servers, Horizon's multiplayer screen lacked vanilla's "Scanning for games on your local network" text and animation, and the rest of the screen didn't match either. Stacked on #299 (blur); merge that first. ## What (vanilla 26.3 `JoinMultiplayerScreen` + `ServerSelectionList`) - **Layout:** `HeaderAndFooterLayout(33, 60)`. The title is centred in the 33-pixel header (y 12, was 8). The list runs from 33 to h−60 between the header and footer separators, with `menu_list_background`. The footer's two button rows are centred in 60 pixels with integer centring; labels come from the `selectServer.*` translations. - **LAN header:** the list always ends with `LANHeader` after the saved servers. Its `LoadingDotsWidget` draws `lanServer.scanning` centred on the row, with `LoadingDotsText` ("O o o", "o O o", "o o O", "o O o", 300 ms each) in grey on its last line. LAN games follow it (`lanServer.title`, MOTD, address). The old "No servers yet" line, which isn't vanilla, is gone. - **Rows:** 305 wide and 36 high, starting 2 pixels below the list top, content 2 pixels in, clipped to the list. The selection is a white outline around black (`extractSelection`, list focused). Saved servers show up to two MOTD lines and the player count left of the status icon: `ping_1..5` by latency, `unreachable` (with "Can't connect to server" in vanilla's red), or the bouncing `pinging_1..5`. The address line under the MOTD, which vanilla doesn't draw, is gone. - **Buttons:** `onSelectedChange` rules: Join needs a server or LAN game selected; Edit and Delete need a saved server. - **Scrolling:** the list scrolls with the wheel (half a row per step) and a draggable scrollbar. The new `ui::Scroll` ports `AbstractScrollArea`'s amount, `mouseScrolled`, `updateScrolling`, `mouseDragged` (pointer outside the list jumps to an end, with the `max / (height − bar)` drag scale) and `onRelease`. Before, the list couldn't scroll at all and rows past the bottom were dropped. The next PR reuses `ui::Scroll` for the world list. Not in this PR: the hover overlays on the server icon (join, move up/down sprites), server favicons and the confirm-delete screen. ## Screenshots (Horizon, offscreen on the Mac mini, GUI scale 2, synthetic panorama as in #299) 1. No saved servers: the title, the empty list with the scanning text and the dots, the six buttons. 2. Eight unreachable saved servers, the second selected: white outline, red "Can't connect to server", the unreachable icons, the vanilla scroller on the right; Join, Edit and Delete enabled. ## Self-check ``` cargo fmt --all -- --check ok cargo clippy --workspace --all-targets -- -D warnings ok cargo test -p horizon-client --lib multiplayer::tests ui::tests ok (30) new: multiplayer::tests (LAN header after the servers, row geometry and scrolling, LoadingDotsText frames) ui::tests::held_scrollbars_follow_the_pointer_and_stop_at_the_ends 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 ``` Part of #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:26 +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#2470
No description provided.