[PR #3012] [MERGED] fix(client): ConnectScreen as 26.3 draws it, with Cancel #4753

Closed
opened 2026-11-03 05:07:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3012
Author: @feeldev12
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: feat/connect-screen


📝 Commits (1)

  • 752fc21 fix(client): ConnectScreen as 26.3 draws it, with Cancel

📊 Changes

3 files changed (+73 additions, -20 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+10 -2)
📝 crates/horizon-client/src/game/remote.rs (+34 -18)
📝 crates/horizon-client/src/level_loading.rs (+29 -0)

📄 Description

What and why

Joining a server drew a flat dark fill with the status and the server address, and there was no way to give up on a slow or stuck connection short of closing the game.

  • remote_overlay draws ConnectScreen as 26.3 does: the menu background over the panorama with its blur (remote_loading joins the title and menu_blur checks), the translated status centred at height / 2 - 50, and Cancel (200x20 at width / 2 - 100, height / 4 + 132), which leaves the server (leave_server) back to where the player came from.
  • Once the login is done (joined), the LevelLoadingScreen's multiplayer.downloadingTerrain until the player is placed.
  • Cancel is only for a server's connection, not single player's in-memory join, and only before the login completes. Its click comes after the link prompt, server pack prompt and dialogs, so those keep their clicks.
  • Escape does nothing on this screen, as in vanilla.

Vanilla reference

  • ConnectScreen.init: Button.builder(GUI_CANCEL, …).bounds(width / 2 - 100, height / 4 + 120 + 12, 200, 20); the press sets aborted, cancels the channel future, connection.disconnect(ABORT_CONNECTION) and setScreen(parent).
  • ConnectScreen.extractRenderState: centeredText(font, status, width / 2, height / 2 - 50, -1) over Screen's default background.
  • ConnectScreen.shouldCloseOnEsc returns false.

No harness: screen layout and input.

Self-check

cargo fmt and cargo check -p horizon-client --all-targets are clean. I didn't run the full pr_ready.py locally (it is slow on this machine); CI's verify covers it.


🔄 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/3012 **Author:** [@feeldev12](https://github.com/feeldev12) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/connect-screen` --- ### 📝 Commits (1) - [`752fc21`](https://github.com/horizon-rust/horizon/commit/752fc2170a857ef42502440208a097d4b0e84397) fix(client): ConnectScreen as 26.3 draws it, with Cancel ### 📊 Changes **3 files changed** (+73 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+10 -2) 📝 `crates/horizon-client/src/game/remote.rs` (+34 -18) 📝 `crates/horizon-client/src/level_loading.rs` (+29 -0) </details> ### 📄 Description ## What and why Joining a server drew a flat dark fill with the status and the server address, and there was no way to give up on a slow or stuck connection short of closing the game. - `remote_overlay` draws `ConnectScreen` as 26.3 does: the menu background over the panorama with its blur (`remote_loading` joins the title and `menu_blur` checks), the translated status centred at `height / 2 - 50`, and **Cancel** (200x20 at `width / 2 - 100, height / 4 + 132`), which leaves the server (`leave_server`) back to where the player came from. - Once the login is done (`joined`), the LevelLoadingScreen's `multiplayer.downloadingTerrain` until the player is placed. - Cancel is only for a server's connection, not single player's in-memory join, and only before the login completes. Its click comes after the link prompt, server pack prompt and dialogs, so those keep their clicks. - Escape does nothing on this screen, as in vanilla. ## Vanilla reference - `ConnectScreen.init`: `Button.builder(GUI_CANCEL, …).bounds(width / 2 - 100, height / 4 + 120 + 12, 200, 20)`; the press sets `aborted`, cancels the channel future, `connection.disconnect(ABORT_CONNECTION)` and `setScreen(parent)`. - `ConnectScreen.extractRenderState`: `centeredText(font, status, width / 2, height / 2 - 50, -1)` over `Screen`'s default background. - `ConnectScreen.shouldCloseOnEsc` returns false. No harness: screen layout and input. ## Self-check `cargo fmt` and `cargo check -p horizon-client --all-targets` are clean. I didn't run the full `pr_ready.py` locally (it is slow on this machine); CI's `verify` covers it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:40 +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#4753
No description provided.