[PR #5339] [MERGED] Narrate the title, options, pause, death, chat, loading and credits screens #6221

Closed
opened 2026-11-03 06:16:02 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: narrator/07-menus


📝 Commits (10+)

  • 19c2a6f Narrate chat, overlays and the game's messages where vanilla does
  • 93adc09 Port NarratorLinux: flite's cmu_us_kal16 voice on the narrator
  • b309894 Add horizon-ctl narration: the narrator's status and recent messages
  • 0308ba7 Port NarratorMac: NSSpeechSynthesizer on the narrator
  • 7983abb Turn the macOS speech thread's run loop over while it idles
  • c635604 Record each frame's screen narration beside its widgets
  • 9ddec4a Narrate the open screen from its recorded narration as Screen does
  • 8d221f0 Narrate the title screens, options pages, pause menu and death screen
  • 6f67cb3 Narrate the chat, level loading, connect, saving and credits screens
  • 73bdc8e Merge main into #5335

📊 Changes

37 files changed (+3209 additions, -141 deletions)

View changed files

📝 Cargo.lock (+4 -0)
📝 crates/horizon-client-render/src/chat.rs (+34 -4)
📝 crates/horizon-client-render/src/chat_tests.rs (+33 -0)
📝 crates/horizon-client-render/src/options_ui.rs (+15 -0)
📝 crates/horizon-client-render/src/screen_draw.rs (+23 -9)
📝 crates/horizon-client-render/src/tab_list.rs (+44 -1)
📝 crates/horizon-client-render/src/ui.rs (+19 -0)
📝 crates/horizon-client-render/src/widgets.rs (+460 -0)
📝 crates/horizon-client/src/bin/horizon-ctl/commands.rs (+3 -0)
📝 crates/horizon-client/src/game.rs (+44 -1)
📝 crates/horizon-client/src/game/chat.rs (+21 -1)
📝 crates/horizon-client/src/game/control.rs (+11 -0)
📝 crates/horizon-client/src/game/creative_hotbar.rs (+2 -0)
📝 crates/horizon-client/src/game/debug_keys.rs (+7 -2)
📝 crates/horizon-client/src/game/jukebox.rs (+4 -2)
📝 crates/horizon-client/src/game/lan_screen.rs (+15 -12)
📝 crates/horizon-client/src/game/narrator.rs (+91 -3)
📝 crates/horizon-client/src/game/pad_menu.rs (+15 -0)
📝 crates/horizon-client/src/game/remote.rs (+228 -66)
📝 crates/horizon-client/src/game/saving.rs (+9 -0)

...and 17 more files

📄 Description

🤖 Opened by leifiyoo's AI agent (Claude), not by leifiyoo.

Part 7 of 16 of the narrator series. All 16 PRs have to be merged, in this order, for the narrator to work completely: #5333 → #5334 → #5335 → #5336 → #5337 → #5338 → #5339 → #5340 → #5341 → #5342 → #5343 → #5344 → #5346 → #5347 → #5348 → #5349. Each PR builds on the one before it (stacked branches), so until the previous one is merged this PR's diff also shows its commits; merging only some of them, or out of order, leaves the narrator unfinished.

Stacked on #5338 — merge that first; until then this PR also shows its commits.

The narrator now reads the menus: the title screen and its world screens' confirms and alerts, every options page, the pause menu, the death screen, the chat screen (its usage and the message typed), the loading and connect screens (progress every 2 s), the saving screen and the credits. The widget under the mouse or focused is read with its position and how to use it.

What vanilla does

  • MouseHandler / KeyboardHandler call Screen.afterMouseMove, afterMouseAction, afterKeyboardAction before the screen takes the input; GameNarrator.updateNarratorStatus schedules the open screen's narration.
  • Titles: TitleScreen (narrator.screen.title), ConfirmScreen / AlertScreen (CommonComponents.joinForNarration(title, message)), BackupConfirmScreen, OptimizeWorldScreen, AccessibilityOnboardingScreen, BanNoticeScreens' ConfirmLinkScreen, SafetyScreen, PauseScreen, DeathScreen.
  • ChatScreen.updateNarrationState: title, chat_screen.usage (+ chat_screen.restricted.narration), chat_screen.message. LevelLoadingScreen.updateNarratedWidget: loading.progress when hasProgress, every 2 s; ConnectScreen has NO_TITLE; FileFixerProgressScreen, ServerReconfigScreen and GenericMessageScreen (saving) their titles; WinScreen its narrator components and lines.

What changed

  • crates/horizon-client/src/title.rs: each title-screen mode's ScreenInfo (including the optimize, low disk space, onboarding and ban notice screens that main gained since).
  • Options pages, Horizon's HDR calibration page included, name themselves before main's calibration view draws.
  • crates/horizon-client/src/game/screen_info.rs (new): the chat, level loading and confirm narrations.
  • game.rs, game/remote.rs: the loading screens (single player's start with the server's progress, a world opening, FileFixerProgressScreen, a server's terrain, reconfiguration, connect).
  • game/narrator.rs (the input hooks), game/startup_menu.rs, game/screens.rs, game/chat.rs, game/saving.rs, game/pad_menu.rs, game/win.rs, win_screen.rs, crates/horizon-client-render/src/options_ui.rs.

How it was tested

  • cargo test -p horizon-client --bins screen_info (chat, loading, confirm narrations as translation keys), cargo test -p horizon-client --lib win_screen (the poem narrated line by line).
  • clippy (all targets) clean at this tip; fmt.
  • To try: HORIZON_NO_AUDIO=1, then horizon-ctl narration after moving through the title, options and pause menu.

Known differences from vanilla

  • "Screen element i out of n" follows the order screens record widgets in; most match vanilla's add order, a few approximate it.
  • The startup LoadingOverlay (resources loading) isn't narrated, as vanilla's overlay isn't a screen.

🤖 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/5339 **Author:** [@leifiyoo](https://github.com/leifiyoo) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `narrator/07-menus` --- ### 📝 Commits (10+) - [`19c2a6f`](https://github.com/horizon-rust/horizon/commit/19c2a6ff82507ef54d26cfb381f8ecc01c9565fb) Narrate chat, overlays and the game's messages where vanilla does - [`93adc09`](https://github.com/horizon-rust/horizon/commit/93adc0997c67723c684c2644f1af349798787c13) Port NarratorLinux: flite's cmu_us_kal16 voice on the narrator - [`b309894`](https://github.com/horizon-rust/horizon/commit/b309894c945d30637be8a347b8ff34a020520f5c) Add horizon-ctl narration: the narrator's status and recent messages - [`0308ba7`](https://github.com/horizon-rust/horizon/commit/0308ba799fdd9fc680c5e9d177a2f98dfd9b259b) Port NarratorMac: NSSpeechSynthesizer on the narrator - [`7983abb`](https://github.com/horizon-rust/horizon/commit/7983abb95e233ec78b05996ded3ffe83bd05ed8e) Turn the macOS speech thread's run loop over while it idles - [`c635604`](https://github.com/horizon-rust/horizon/commit/c635604a89164a91b89f455839d8d1ce943dac0d) Record each frame's screen narration beside its widgets - [`9ddec4a`](https://github.com/horizon-rust/horizon/commit/9ddec4a5493a377e7eb06bd441b84aa01bd24455) Narrate the open screen from its recorded narration as Screen does - [`8d221f0`](https://github.com/horizon-rust/horizon/commit/8d221f0055ad0518c28c797b13aa5195d4304efa) Narrate the title screens, options pages, pause menu and death screen - [`6f67cb3`](https://github.com/horizon-rust/horizon/commit/6f67cb30802edb4113916ae4bd734677405974ad) Narrate the chat, level loading, connect, saving and credits screens - [`73bdc8e`](https://github.com/horizon-rust/horizon/commit/73bdc8ef5a4229307a8bbc6ae6ba5914865ac9f0) Merge main into #5335 ### 📊 Changes **37 files changed** (+3209 additions, -141 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+4 -0) 📝 `crates/horizon-client-render/src/chat.rs` (+34 -4) 📝 `crates/horizon-client-render/src/chat_tests.rs` (+33 -0) 📝 `crates/horizon-client-render/src/options_ui.rs` (+15 -0) 📝 `crates/horizon-client-render/src/screen_draw.rs` (+23 -9) 📝 `crates/horizon-client-render/src/tab_list.rs` (+44 -1) 📝 `crates/horizon-client-render/src/ui.rs` (+19 -0) 📝 `crates/horizon-client-render/src/widgets.rs` (+460 -0) 📝 `crates/horizon-client/src/bin/horizon-ctl/commands.rs` (+3 -0) 📝 `crates/horizon-client/src/game.rs` (+44 -1) 📝 `crates/horizon-client/src/game/chat.rs` (+21 -1) 📝 `crates/horizon-client/src/game/control.rs` (+11 -0) 📝 `crates/horizon-client/src/game/creative_hotbar.rs` (+2 -0) 📝 `crates/horizon-client/src/game/debug_keys.rs` (+7 -2) 📝 `crates/horizon-client/src/game/jukebox.rs` (+4 -2) 📝 `crates/horizon-client/src/game/lan_screen.rs` (+15 -12) 📝 `crates/horizon-client/src/game/narrator.rs` (+91 -3) 📝 `crates/horizon-client/src/game/pad_menu.rs` (+15 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+228 -66) 📝 `crates/horizon-client/src/game/saving.rs` (+9 -0) _...and 17 more files_ </details> ### 📄 Description > 🤖 Opened by leifiyoo's AI agent (Claude), not by leifiyoo. **Part 7 of 16 of the narrator series.** All 16 PRs have to be merged, in this order, for the narrator to work completely: #5333 → #5334 → #5335 → #5336 → #5337 → #5338 → #5339 → #5340 → #5341 → #5342 → #5343 → #5344 → #5346 → #5347 → #5348 → #5349. Each PR builds on the one before it (stacked branches), so until the previous one is merged this PR's diff also shows its commits; merging only some of them, or out of order, leaves the narrator unfinished. Stacked on #5338 — merge that first; until then this PR also shows its commits. The narrator now reads the menus: the title screen and its world screens' confirms and alerts, every options page, the pause menu, the death screen, the chat screen (its usage and the message typed), the loading and connect screens (progress every 2 s), the saving screen and the credits. The widget under the mouse or focused is read with its position and how to use it. ## What vanilla does - `MouseHandler` / `KeyboardHandler` call `Screen.afterMouseMove`, `afterMouseAction`, `afterKeyboardAction` before the screen takes the input; `GameNarrator.updateNarratorStatus` schedules the open screen's narration. - Titles: `TitleScreen` (`narrator.screen.title`), `ConfirmScreen` / `AlertScreen` (`CommonComponents.joinForNarration(title, message)`), `BackupConfirmScreen`, `OptimizeWorldScreen`, `AccessibilityOnboardingScreen`, `BanNoticeScreens`' `ConfirmLinkScreen`, `SafetyScreen`, `PauseScreen`, `DeathScreen`. - `ChatScreen.updateNarrationState`: title, `chat_screen.usage` (+ `chat_screen.restricted.narration`), `chat_screen.message`. `LevelLoadingScreen.updateNarratedWidget`: `loading.progress` when `hasProgress`, every 2 s; `ConnectScreen` has `NO_TITLE`; `FileFixerProgressScreen`, `ServerReconfigScreen` and `GenericMessageScreen` (saving) their titles; `WinScreen` its narrator components and lines. ## What changed - `crates/horizon-client/src/title.rs`: each title-screen mode's `ScreenInfo` (including the optimize, low disk space, onboarding and ban notice screens that main gained since). - Options pages, Horizon's HDR calibration page included, name themselves before main's calibration view draws. - `crates/horizon-client/src/game/screen_info.rs` (new): the chat, level loading and confirm narrations. - `game.rs`, `game/remote.rs`: the loading screens (single player's start with the server's progress, a world opening, `FileFixerProgressScreen`, a server's terrain, reconfiguration, connect). - `game/narrator.rs` (the input hooks), `game/startup_menu.rs`, `game/screens.rs`, `game/chat.rs`, `game/saving.rs`, `game/pad_menu.rs`, `game/win.rs`, `win_screen.rs`, `crates/horizon-client-render/src/options_ui.rs`. ## How it was tested - `cargo test -p horizon-client --bins screen_info` (chat, loading, confirm narrations as translation keys), `cargo test -p horizon-client --lib win_screen` (the poem narrated line by line). - clippy (all targets) clean at this tip; fmt. - To try: `HORIZON_NO_AUDIO=1`, then `horizon-ctl narration` after moving through the title, options and pause menu. ## Known differences from vanilla - "Screen element i out of n" follows the order screens record widgets in; most match vanilla's add order, a few approximate it. - The startup `LoadingOverlay` (resources loading) isn't narrated, as vanilla's overlay isn't a screen. 🤖 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-03 06:16:02 +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#6221
No description provided.