[PR #402] [MERGED] Prevent hotbar selection from changing behind menus #2538

Closed
opened 2026-11-02 15:57:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/402
Author: @Online5277
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @ludovic111

Base: main ← Head: fix/menu-hotbar-keys


📝 Commits (1)

  • 9b4d5d5 Keep gameplay hotbar selection out of open menus

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+3 -1)

📄 Description

Number keys that an open screen did not consume fell through to gameplay hotbar selection. Pressing 1–9 in the pause menu or over an inventory's background could therefore silently change the active slot.

Restrict that selection arm to Screen::Playing. Existing container swaps and creative display-slot copies run first and remain available; the creative full-stack assignment portion of #401 already landed in #391. Keyboard, rebound keys, controller mappings and multiplayer use this shared handler.

Fixes #401.

Validation:

  • Existing creative tests, including full-stack number-key assignment.
  • Game binary tests and client all-target Clippy with warnings denied.
  • Formatting, diff and public-tree checks.

No game window was opened. Manual check: select slot 1, open pause/inventory/creative, press 2–9 over menu backgrounds and confirm slot 1 stays active after closing. Hover a creative item and press 3 to copy its full stack to slot 3 without changing the active slot; in survival, verify a hovered-slot number-key swap. With menus closed, 1–9 must still select normally.


🔄 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/402 **Author:** [@Online5277](https://github.com/Online5277) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/menu-hotbar-keys` --- ### 📝 Commits (1) - [`9b4d5d5`](https://github.com/horizon-rust/horizon/commit/9b4d5d561381cd3f100feeb812a7afa35ae4f086) Keep gameplay hotbar selection out of open menus ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+3 -1) </details> ### 📄 Description Number keys that an open screen did not consume fell through to gameplay hotbar selection. Pressing 1–9 in the pause menu or over an inventory's background could therefore silently change the active slot. Restrict that selection arm to `Screen::Playing`. Existing container swaps and creative display-slot copies run first and remain available; the creative full-stack assignment portion of #401 already landed in #391. Keyboard, rebound keys, controller mappings and multiplayer use this shared handler. Fixes #401. Validation: - Existing creative tests, including full-stack number-key assignment. - Game binary tests and client all-target Clippy with warnings denied. - Formatting, diff and public-tree checks. No game window was opened. Manual check: select slot 1, open pause/inventory/creative, press 2–9 over menu backgrounds and confirm slot 1 stays active after closing. Hover a creative item and press 3 to copy its full stack to slot 3 without changing the active slot; in survival, verify a hovered-slot number-key swap. With menus closed, 1–9 must still select normally. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:57:01 +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#2538
No description provided.