[PR #1687] [MERGED] Creative inventory: highlight hovered hotbar slots #3688

Closed
opened 2026-11-03 04:11:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1687
Author: @rdbtCVS
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @ludovic111

Base: main ← Head: fix/creative-hotbar-hover


📝 Commits (1)

  • b0a5334 Creative inventory: highlight hovered hotbar slots

📊 Changes

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

View changed files

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

📄 Description

🤖 Opened by rdbt's AI agent (opencode, deepseek-v4.1-flash-free), not by rdbt himself.

What and why

The creative item-tab hotbar loop only set the tooltip; it never drew the white hover fill that the 5x9 grid draws. This draws the same 16x16 white overlay (alpha 128) over any hovered hotbar slot, empty or not, then uses the slot's stack for the tooltip.

Fixes #1341

Vanilla reference

Vanilla's AbstractContainerScreen highlights the hovered slot (renderSlotHighlight) for every registered slot, so an empty creative hotbar slot still gets the white focus overlay. No harness covers the GUI; verified by inspection against the adjacent grid path in draw_creative.

Self-check

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at 75d70a1a7, 2 min 4 s)

Check Result
Scope ✅ 1 files, +3 −3
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (6 s)
clippy ✅ (35 s)
tests: horizon-client ✅ 1199 passed (1 min 22 s)
doc tests ✅ 0 passed (1 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses

Screenshots

Verified offscreen with horizon-ctl against the prepared 26.3 resources. Hovering an empty hotbar slot now samples rgb(197,197,197), the same fill as hovering a grid slot over its base colour; before the change it stayed rgb(139,139,139). The screenshots are in the issue's scenario and in the review thread; they are not committed here.

🤖 Generated with opencode


🔄 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/1687 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/creative-hotbar-hover` --- ### 📝 Commits (1) - [`b0a5334`](https://github.com/horizon-rust/horizon/commit/b0a5334cb53c84db4369aae4e41de7b623e9c50c) Creative inventory: highlight hovered hotbar slots ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+3 -3) </details> ### 📄 Description > 🤖 Opened by rdbt's AI agent (opencode, deepseek-v4.1-flash-free), not by rdbt himself. ## What and why The creative item-tab hotbar loop only set the tooltip; it never drew the white hover fill that the 5x9 grid draws. This draws the same 16x16 white overlay (alpha 128) over any hovered hotbar slot, empty or not, then uses the slot's stack for the tooltip. Fixes #1341 ## Vanilla reference Vanilla's `AbstractContainerScreen` highlights the hovered slot (`renderSlotHighlight`) for every registered slot, so an empty creative hotbar slot still gets the white focus overlay. No harness covers the GUI; verified by inspection against the adjacent grid path in `draw_creative`. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at 75d70a1a7, 2 min 4 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +3 −3 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (6 s) | | clippy | ✅ (35 s) | | tests: horizon-client | ✅ 1199 passed (1 min 22 s) | | doc tests | ✅ 0 passed (1 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | ## Screenshots Verified offscreen with `horizon-ctl` against the prepared 26.3 resources. Hovering an empty hotbar slot now samples `rgb(197,197,197)`, the same fill as hovering a grid slot over its base colour; before the change it stayed `rgb(139,139,139)`. The screenshots are in the issue's scenario and in the review thread; they are not committed here. 🤖 Generated with [opencode](https://opencode.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:11:26 +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#3688
No description provided.