[PR #3677] [CLOSED] Mods: a settings page opens from the title screen too #5144

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3677
Author: @Domanffe
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: fix/mod-settings-from-title


📝 Commits (1)

  • e413fde Mods: a settings page opens from the title screen too

📊 Changes

2 files changed (+28 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+28 -3)
📝 crates/horizon-client/src/game/mods.rs (+0 -3)

📄 Description

🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself.

Fixes #3648.

Game::open_mod_screen returned early whenever the title screen was up, so Options > Mods > Settings did nothing there. The rows and their buttons are drawn because the mods run before a world loads and has_ui_settings() reads the live instance, but the request was dropped without a word. The page could not be shown either: hud_layers draws the title and returns before it reaches the Screen::Mod arm, and the title's own mouse and key arms swallow input while it is up.

Four small pieces: the guard removed, Screen::Mod drawn beside the Options branch, and the title's mouse and key arms skipped while a mod page is up (clicks, Done, and Escape to leave the page). Inside a world nothing changes.

Measured on a --profile fast build of this branch with --features mods, run in a copy of a real v0.2.97 install (lang:ru_ru, GUI scale 2, Blockscope / FPS Counter / Recipes / Zoom on):

  • Before, v0.2.97 at the title screen: click settings answers {"clicked":"settings","ok":true,"screen":"title"} and ui stays on the mods list, 10 widgets.
  • After, same folder, title screen: click settings shows the page, 6 widgets (Reach / Position / Background / Coordinates / Item icon / Done). click reach changes Reach: 20 blocks to Reach: 64 blocks, so the page is live, and click done returns to the mods list. The title screen still answers after that: its own settings page, Одиночная игра and Назад all work.
  • After, inside a world: unchanged. click settings gives screen: mod with the same 6 widgets, done returns to options, Готово returns to the paused game.
  • Not observed: Escape on the page at the title. horizon-ctl key refuses to inject keys without a world open (no world open; use: open WORLD), so the arm that routes Escape is compiled and reviewed but unexercised; the same close_mod_screen path is exercised through Done.

No test added: the page needs a running mod and the title-screen state, and the crate's menu tests build neither. That is the one case I did not pin.

The pr_ready block follows as a comment.


🔄 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/3677 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/mod-settings-from-title` --- ### 📝 Commits (1) - [`e413fde`](https://github.com/horizon-rust/horizon/commit/e413fdee3c1afd6ea895a9b396b9f3f66ffea6c9) Mods: a settings page opens from the title screen too ### 📊 Changes **2 files changed** (+28 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+28 -3) 📝 `crates/horizon-client/src/game/mods.rs` (+0 -3) </details> ### 📄 Description > 🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself. Fixes #3648. `Game::open_mod_screen` returned early whenever the title screen was up, so `Options > Mods > Settings` did nothing there. The rows and their buttons are drawn because the mods run before a world loads and `has_ui_settings()` reads the live instance, but the request was dropped without a word. The page could not be shown either: `hud_layers` draws the title and returns before it reaches the `Screen::Mod` arm, and the title's own mouse and key arms swallow input while it is up. Four small pieces: the guard removed, `Screen::Mod` drawn beside the `Options` branch, and the title's mouse and key arms skipped while a mod page is up (clicks, `Done`, and Escape to leave the page). Inside a world nothing changes. **Measured** on a `--profile fast` build of this branch with `--features mods`, run in a copy of a real v0.2.97 install (`lang:ru_ru`, GUI scale 2, Blockscope / FPS Counter / Recipes / Zoom on): - Before, v0.2.97 at the title screen: `click settings` answers `{"clicked":"settings","ok":true,"screen":"title"}` and `ui` stays on the mods list, 10 widgets. - After, same folder, title screen: `click settings` shows the page, 6 widgets (Reach / Position / Background / Coordinates / Item icon / Done). `click reach` changes `Reach: 20 blocks` to `Reach: 64 blocks`, so the page is live, and `click done` returns to the mods list. The title screen still answers after that: its own settings page, `Одиночная игра` and `Назад` all work. - After, inside a world: unchanged. `click settings` gives `screen: mod` with the same 6 widgets, `done` returns to `options`, `Готово` returns to the paused game. - Not observed: Escape on the page at the title. `horizon-ctl key` refuses to inject keys without a world open (`no world open; use: open WORLD`), so the arm that routes Escape is compiled and reviewed but unexercised; the same `close_mod_screen` path is exercised through `Done`. No test added: the page needs a running mod and the title-screen state, and the crate's menu tests build neither. That is the one case I did not pin. The `pr_ready` block follows as a comment. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:10:32 +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#5144
No description provided.