[PR #6240] [MERGED] Widen the recipe book's magnifier hit box to the search box #6738

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6240
Author: @MSedgeMC
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/recipe-magnifier


📝 Commits (1)

  • 927f2f5 Widen the recipe book's magnifier hit box to the search box

📊 Changes

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

View changed files

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

📄 Description

RecipeBookComponent builds the magnifier's clickable rectangle as

// javap -p -c on RecipeBookComponent
188: EditBox.getY
199: EditBox.getX
202: getXOrigin
203: isub                       // width = searchBox.getX() - getXOrigin()
208: EditBox.getHeight
214: invokestatic ScreenRectangle.of(HORIZONTAL, xOrigin + 8, y, width, height)

and mouseClicked tests magnifierIconPlacement.containsPoint(...) before falling through to
the search box. Horizon's rect was inside(cursor, xo + 8.0, yo + 13.0, 17.0, 14.0): the same
origin and height, but 17 wide instead of the 25 the search box starts at, so the rightmost
eight pixels of the magnifier did nothing.

Proven: compile-checked with cargo check -p horizon-client --lib --bins on the build VM,
together with the two other one-line changes in this batch. No test: the hit test needs a laid
out book and a cursor.

Not proven: not checked in game. The check is clicking the right edge of the magnifier in
the crafting book and seeing the cursor land in the field.


🔄 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/6240 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/recipe-magnifier` --- ### 📝 Commits (1) - [`927f2f5`](https://github.com/horizon-rust/horizon/commit/927f2f5e71fe84d1eae76676716a1febb6091b7f) Widen the recipe book's magnifier hit box to the search box ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/recipe_book.rs` (+3 -1) </details> ### 📄 Description `RecipeBookComponent` builds the magnifier's clickable rectangle as ```java // javap -p -c on RecipeBookComponent 188: EditBox.getY 199: EditBox.getX 202: getXOrigin 203: isub // width = searchBox.getX() - getXOrigin() 208: EditBox.getHeight 214: invokestatic ScreenRectangle.of(HORIZONTAL, xOrigin + 8, y, width, height) ``` and `mouseClicked` tests `magnifierIconPlacement.containsPoint(...)` before falling through to the search box. Horizon's rect was `inside(cursor, xo + 8.0, yo + 13.0, 17.0, 14.0)`: the same origin and height, but 17 wide instead of the 25 the search box starts at, so the rightmost eight pixels of the magnifier did nothing. **Proven:** compile-checked with `cargo check -p horizon-client --lib --bins` on the build VM, together with the two other one-line changes in this batch. No test: the hit test needs a laid out book and a cursor. **Not proven:** not checked in game. The check is clicking the right edge of the magnifier in the crafting book and seeing the cursor land in the field. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:25: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#6738
No description provided.