[PR #5349] [MERGED] Navigate the loading title with the keyboard too #6231

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

📋 Pull Request Information

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

Base: main ← Head: narrator/16-keyboard-loading


📝 Commits (10+)

  • 37313e8 Narrate World Options' switches and lock, and the stats lists
  • 6fd6a9b Narrate the recipe book as RecipeBookComponent does
  • 8049680 Leave inactive edit boxes out and keep the book button's focus
  • a60214a Document the narrator
  • 741cc76 Narrate options lists, key binds, pack lists and dialogs as vanilla does
  • bbbdd3d Narrate game rules and command block switches as CycleButtons
  • 9171f3b Let horizon-ctl's keys and typing reach the screen narration
  • 27f9488 Navigate menus with Tab, the arrows and Enter as vanilla does
  • 2a80bd5 Navigate the loading title with the keyboard too
  • bc79141 List two more narrator differences found end to end

📊 Changes

23 files changed (+2846 additions, -227 deletions)

View changed files

📝 crates/horizon-client-render/src/options_ui.rs (+334 -85)
📝 crates/horizon-client-render/src/pack_screen.rs (+47 -6)
📝 crates/horizon-client-render/src/ui.rs (+21 -3)
📝 crates/horizon-client-render/src/widgets.rs (+102 -9)
📝 crates/horizon-client/src/game.rs (+22 -3)
📝 crates/horizon-client/src/game/command_blocks.rs (+126 -1)
📝 crates/horizon-client/src/game/control.rs (+4 -0)
📝 crates/horizon-client/src/game/dialogs.rs (+71 -0)
➕ crates/horizon-client/src/game/key_focus.rs (+495 -0)
📝 crates/horizon-client/src/game/lan_screen.rs (+195 -1)
📝 crates/horizon-client/src/game/narrator.rs (+20 -12)
📝 crates/horizon-client/src/game/pad.rs (+2 -0)
📝 crates/horizon-client/src/game/pad_menu.rs (+440 -61)
📝 crates/horizon-client/src/game/recipe_book.rs (+98 -3)
📝 crates/horizon-client/src/game/startup_menu.rs (+285 -3)
📝 crates/horizon-client/src/game/stats_screen.rs (+104 -31)
📝 crates/horizon-client/src/game_rules_screen.rs (+100 -1)
📝 crates/horizon-client/src/recipe_book_screen.rs (+1 -1)
📝 crates/horizon-client/src/screen_narrator.rs (+124 -7)
📝 crates/horizon-client/src/title.rs (+45 -0)

...and 3 more files

📄 Description

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

Part 16 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 #5348 — merge that first; until then this PR also shows its commits.

The title screen shown while resources are still loading (the startup menu) takes Tab, the arrows and Enter as the game's menus do, and hands its focus to the game's when it takes over.

What vanilla does

Vanilla's title screen is the same Screen before and after loading, so Screen.keyPressed's navigation and focus carry over.

What changed

  • crates/horizon-client/src/game/startup_menu.rs: the startup menu's keyboard navigation; game/key_focus.rs (follow: the focus follows its widget between frames), game/pad_menu.rs (key_focus_adopt: the game takes the startup menu's focus).
  • docs/narrator.md: points at the keyboard navigation.

How it was tested

  • cargo test -p horizon-client --bins key_focus.
  • At the series tip: cargo clippy -p horizon-client -p horizon-client-render -p horizon-narrator --all-targets -- -D warnings, cargo fmt --all --check, cargo test -p horizon-narrator, cargo test -p horizon-client-render --lib, cargo test -p horizon-client --lib, cargo test -p horizon-client --bins. Results: narrator 19 pass; client-render lib 744 pass (21 ignored, run with --test-threads=1: in parallel they hang on this Windows machine, on plain main too); client lib 1025 pass (28 ignored), and each_world_preset_writes_its_own_generator passes; client bins 396 pass, and 1 fails (native_hooks::tests::property_setters_refuse_no_change), which fails the same way on plain main (b8cf85f8c).

🤖 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/5349 **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/16-keyboard-loading` --- ### 📝 Commits (10+) - [`37313e8`](https://github.com/horizon-rust/horizon/commit/37313e8314057954e02ac247e317902a5d45d2b0) Narrate World Options' switches and lock, and the stats lists - [`6fd6a9b`](https://github.com/horizon-rust/horizon/commit/6fd6a9badb20ee9d0257b4330bcbe868b66d1cb4) Narrate the recipe book as RecipeBookComponent does - [`8049680`](https://github.com/horizon-rust/horizon/commit/80496802e2c752692690d9aca99b5e8707868233) Leave inactive edit boxes out and keep the book button's focus - [`a60214a`](https://github.com/horizon-rust/horizon/commit/a60214a2583f99ce3143b3f49ba24907ec133f31) Document the narrator - [`741cc76`](https://github.com/horizon-rust/horizon/commit/741cc760705bd9e12174f9b1d04f6d9e0b252d1c) Narrate options lists, key binds, pack lists and dialogs as vanilla does - [`bbbdd3d`](https://github.com/horizon-rust/horizon/commit/bbbdd3d1630bfd7d8fbc6d9d3a4859c4f8d7ecdc) Narrate game rules and command block switches as CycleButtons - [`9171f3b`](https://github.com/horizon-rust/horizon/commit/9171f3b8cf48554db014856481e0bd4175ab3dfa) Let horizon-ctl's keys and typing reach the screen narration - [`27f9488`](https://github.com/horizon-rust/horizon/commit/27f94881356c50d31f135a96b4035b59ed03f56e) Navigate menus with Tab, the arrows and Enter as vanilla does - [`2a80bd5`](https://github.com/horizon-rust/horizon/commit/2a80bd539d86e994089eb6ddd788de1677bf9499) Navigate the loading title with the keyboard too - [`bc79141`](https://github.com/horizon-rust/horizon/commit/bc791418cab7bf34ea09cc8076dbe64a3b5d71df) List two more narrator differences found end to end ### 📊 Changes **23 files changed** (+2846 additions, -227 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/options_ui.rs` (+334 -85) 📝 `crates/horizon-client-render/src/pack_screen.rs` (+47 -6) 📝 `crates/horizon-client-render/src/ui.rs` (+21 -3) 📝 `crates/horizon-client-render/src/widgets.rs` (+102 -9) 📝 `crates/horizon-client/src/game.rs` (+22 -3) 📝 `crates/horizon-client/src/game/command_blocks.rs` (+126 -1) 📝 `crates/horizon-client/src/game/control.rs` (+4 -0) 📝 `crates/horizon-client/src/game/dialogs.rs` (+71 -0) ➕ `crates/horizon-client/src/game/key_focus.rs` (+495 -0) 📝 `crates/horizon-client/src/game/lan_screen.rs` (+195 -1) 📝 `crates/horizon-client/src/game/narrator.rs` (+20 -12) 📝 `crates/horizon-client/src/game/pad.rs` (+2 -0) 📝 `crates/horizon-client/src/game/pad_menu.rs` (+440 -61) 📝 `crates/horizon-client/src/game/recipe_book.rs` (+98 -3) 📝 `crates/horizon-client/src/game/startup_menu.rs` (+285 -3) 📝 `crates/horizon-client/src/game/stats_screen.rs` (+104 -31) 📝 `crates/horizon-client/src/game_rules_screen.rs` (+100 -1) 📝 `crates/horizon-client/src/recipe_book_screen.rs` (+1 -1) 📝 `crates/horizon-client/src/screen_narrator.rs` (+124 -7) 📝 `crates/horizon-client/src/title.rs` (+45 -0) _...and 3 more files_ </details> ### 📄 Description > 🤖 Opened by leifiyoo's AI agent (Claude), not by leifiyoo. **Part 16 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 #5348 — merge that first; until then this PR also shows its commits. The title screen shown while resources are still loading (the startup menu) takes Tab, the arrows and Enter as the game's menus do, and hands its focus to the game's when it takes over. ## What vanilla does Vanilla's title screen is the same `Screen` before and after loading, so `Screen.keyPressed`'s navigation and focus carry over. ## What changed - `crates/horizon-client/src/game/startup_menu.rs`: the startup menu's keyboard navigation; `game/key_focus.rs` (`follow`: the focus follows its widget between frames), `game/pad_menu.rs` (`key_focus_adopt`: the game takes the startup menu's focus). - `docs/narrator.md`: points at the keyboard navigation. ## How it was tested - `cargo test -p horizon-client --bins key_focus`. - At the series tip: `cargo clippy -p horizon-client -p horizon-client-render -p horizon-narrator --all-targets -- -D warnings`, `cargo fmt --all --check`, `cargo test -p horizon-narrator`, `cargo test -p horizon-client-render --lib`, `cargo test -p horizon-client --lib`, `cargo test -p horizon-client --bins`. Results: narrator 19 pass; client-render lib 744 pass (21 ignored, run with `--test-threads=1`: in parallel they hang on this Windows machine, on plain `main` too); client lib 1025 pass (28 ignored), and `each_world_preset_writes_its_own_generator` passes; client bins 396 pass, and 1 fails (`native_hooks::tests::property_setters_refuse_no_change`), which fails the same way on plain `main` (b8cf85f8c). 🤖 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:08 +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#6231
No description provided.