[PR #5222] [MERGED] Debug options screen (F3+F6): choose what the F3 overlay shows #6149

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5222
Author: @some-du6e
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: feat/debug-options-screen


📝 Commits (1)

  • e47213a Debug options screen (F3+F6): choose what the F3 overlay shows

📊 Changes

10 files changed (+1061 additions, -79 deletions)

View changed files

📝 .gitignore (+1 -0)
➕ crates/horizon-client/src/debug_entries.rs (+430 -0)
📝 crates/horizon-client/src/game.rs (+24 -4)
📝 crates/horizon-client/src/game/agent.rs (+1 -0)
📝 crates/horizon-client/src/game/control.rs (+4 -2)
📝 crates/horizon-client/src/game/debug_keys.rs (+127 -72)
➕ crates/horizon-client/src/game/debug_options.rs (+466 -0)
📝 crates/horizon-client/src/game/ime.rs (+5 -0)
📝 crates/horizon-client/src/game/screens.rs (+2 -1)
📝 crates/horizon-client/src/lib.rs (+1 -0)

📄 Description

Vanilla 26.3 opens a debug options screen on F3+F6. There you choose, entry by entry, what the F3 overlay shows: off, only while F3 is open, or always, even with F3 closed. In Horizon, F3+F6 did nothing and the overlay always showed the default profile. Closes #5219.

What this adds, ported from the 26.3 client (DebugOptionsScreen, DebugScreenEntries, DebugScreenEntryList, KeyboardHandler, DebugScreenOverlay):

  • The screen (game/debug_options.rs): title, search box, the warning, and the "Debug Screen Text" and "Debug Renderers" sections. All 46 vanilla entries have Off / In Overlay / Always buttons. The footer has Default profile, Performance profile, GUI Scale (debugGuiScale, vanilla's Unchanged / Auto / 1.. cycle, which Horizon had no button for) and Done. Entries hidden by reduced debug info show in grey italic with vanilla's tooltip. The F3 overlay draws under the screen, as Gui does for this screen, and the screen pauses single player.
  • The entries and their file (debug_entries.rs): statuses, profiles, toggleStatus, and debug-profile.json beside options.txt, in vanilla's format (DataVersion with profile or custom). A file that does not parse is reset to the default profile.
  • The overlay follows the entries. Each line block shows only when its entry is enabled. Always entries draw with F3 closed. The chart keys and charts still need F3 open.
  • F3+B and F3+G toggle the entity_hitboxes and chunk_borders entries as vanilla does (Always with F3 closed, In Overlay with it open), and the 3D crosshair is the 3d_crosshair entry. The old show_hitboxes and show_chunk_borders flags are gone.
  • horizon-ctl type reaches the search box, and status reports the screen as debug-options.

Most of the +200/−80 in debug_keys.rs is the existing overlay body split into one function per entry. The line logic is unchanged.

Checked in the game (server thread, offscreen on Xvfb): F3+F6 opens the screen, typing fps filters to that entry, Always keeps the fps line with F3 closed after Done, and F3+B saves entity_hitboxes as alwaysOn.

Not in this PR (follow-up: https://github.com/horizon-rust/horizon/pull/5262): the lines of the ~30 entries Horizon has never drawn (biome, light levels, memory, looking-at, the visualize renderers...), dragging the list's scrollbar, and vanilla's debug-profile.json datafixes.

pr_ready

pr_ready (tools/pr_ready.py --quick on swiss, against origin/main at 19021623b, 7 min 6 s)

Check Result
Scope ⚠️ 10 files, +1061 −79; 1140 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 487 passed (57 s)
rustfmt ✅ (11 s)
clippy ✅ (3 min 50 s)
tests: horizon-client ✅ 1315 passed (2 min 0 s)
doc tests ✅ 0 passed (7 s)
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses

Note

Filed by Opus 5.5 using 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/5222 **Author:** [@some-du6e](https://github.com/some-du6e) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `feat/debug-options-screen` --- ### 📝 Commits (1) - [`e47213a`](https://github.com/horizon-rust/horizon/commit/e47213a981fe1535ffa19fc17828a7abf6d529b1) Debug options screen (F3+F6): choose what the F3 overlay shows ### 📊 Changes **10 files changed** (+1061 additions, -79 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) ➕ `crates/horizon-client/src/debug_entries.rs` (+430 -0) 📝 `crates/horizon-client/src/game.rs` (+24 -4) 📝 `crates/horizon-client/src/game/agent.rs` (+1 -0) 📝 `crates/horizon-client/src/game/control.rs` (+4 -2) 📝 `crates/horizon-client/src/game/debug_keys.rs` (+127 -72) ➕ `crates/horizon-client/src/game/debug_options.rs` (+466 -0) 📝 `crates/horizon-client/src/game/ime.rs` (+5 -0) 📝 `crates/horizon-client/src/game/screens.rs` (+2 -1) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) </details> ### 📄 Description Vanilla 26.3 opens a debug options screen on F3+F6. There you choose, entry by entry, what the F3 overlay shows: off, only while F3 is open, or always, even with F3 closed. In Horizon, F3+F6 did nothing and the overlay always showed the default profile. Closes #5219. What this adds, ported from the 26.3 client (`DebugOptionsScreen`, `DebugScreenEntries`, `DebugScreenEntryList`, `KeyboardHandler`, `DebugScreenOverlay`): - **The screen** (`game/debug_options.rs`): title, search box, the warning, and the "Debug Screen Text" and "Debug Renderers" sections. All 46 vanilla entries have Off / In Overlay / Always buttons. The footer has Default profile, Performance profile, GUI Scale (`debugGuiScale`, vanilla's Unchanged / Auto / 1.. cycle, which Horizon had no button for) and Done. Entries hidden by reduced debug info show in grey italic with vanilla's tooltip. The F3 overlay draws under the screen, as `Gui` does for this screen, and the screen pauses single player. - **The entries and their file** (`debug_entries.rs`): statuses, profiles, `toggleStatus`, and `debug-profile.json` beside `options.txt`, in vanilla's format (`DataVersion` with `profile` or `custom`). A file that does not parse is reset to the default profile. - **The overlay follows the entries.** Each line block shows only when its entry is enabled. Always entries draw with F3 closed. The chart keys and charts still need F3 open. - **F3+B and F3+G** toggle the `entity_hitboxes` and `chunk_borders` entries as vanilla does (Always with F3 closed, In Overlay with it open), and the 3D crosshair is the `3d_crosshair` entry. The old `show_hitboxes` and `show_chunk_borders` flags are gone. - `horizon-ctl type` reaches the search box, and `status` reports the screen as `debug-options`. Most of the +200/−80 in `debug_keys.rs` is the existing overlay body split into one function per entry. The line logic is unchanged. Checked in the game (server thread, offscreen on Xvfb): F3+F6 opens the screen, typing `fps` filters to that entry, Always keeps the fps line with F3 closed after Done, and F3+B saves `entity_hitboxes` as `alwaysOn`. Not in this PR (follow-up: https://github.com/horizon-rust/horizon/pull/5262): the lines of the ~30 entries Horizon has never drawn (biome, light levels, memory, looking-at, the visualize renderers...), dragging the list's scrollbar, and vanilla's `debug-profile.json` datafixes. <details><summary>pr_ready</summary> **pr_ready** (`tools/pr_ready.py --quick` on swiss, against origin/main at 19021623b, 7 min 6 s) | Check | Result | | --- | --- | | Scope | ⚠️ 10 files, +1061 −79; 1140 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 487 passed (57 s) | | rustfmt | ✅ (11 s) | | clippy | ✅ (3 min 50 s) | | tests: horizon-client | ✅ 1315 passed (2 min 0 s) | | doc tests | ✅ 0 passed (7 s) | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | </details> > [!NOTE] > Filed by Opus 5.5 using 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:14:56 +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#6149
No description provided.