[PR #7049] [MERGED] Port ledger: keyboard focus navigation's screen rectangles are ported #7295

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

📋 Pull Request Information

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

Base: main ← Head: fix/port-map-client2-013


📝 Commits (1)

  • 6581029 Port ledger: focus navigation's screen rectangles are ported

📊 Changes

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

View changed files

📝 tools/port_map/client2-013.tsv (+10 -10)

📄 Description

Vanilla moves the keyboard focus between widgets with ScreenRectangle geometry: getBorder (the strip past the screen's edge), step and getBoundInDirection (the focused edge), overlaps/overlapsInAxis (targets on the other axis) and getCenterInAxis (the second, vaguer pass), driven by the ScreenAxis, ScreenDirection and ScreenPosition enums.

What was wrong. tools/port_map/client2-013.tsv listed nine of them as missing with the note "not in Horizon's menus", and the onboarding row still said its screen was missing. Keyboard focus navigation landed in #4638 (27f948813); the geometry is crates/horizon-client-input/src/gamepad.rs, whose focus_step_rect doc already names nextFocusPathInDirection and ScreenRectangle's inclusive bounds:

row now says
ScreenRectangle.step, .getBorder port -> game/key_focus.rs::edge (the strip one pixel past the focused edge, or behind the screen when nothing is focused)
ScreenRectangle.getBoundInDirection, .overlaps, .overlapsInAxis inline -> gamepad.rs::focus_step_strict
ScreenRectangle.getCenterInAxis inline -> gamepad.rs::focus_step_vague
ScreenAxis, ScreenDirection, ScreenPosition skip:other with the note that they are gamepad::Button's DPad values and Rect bounds, compared directly
AccessibilityOnboardingScreen.setInitialFocus stays missing, but its note no longer claims the onboarding screen is missing: the screen is ported in title/onboarding.rs; only the focus starting on the Narrator button is not

ScreenRectangle.intersection stays missing (a nested clip is still not intersected: paint replaces the scissor), as do GuiSkinRenderer.renderToTexture and ChatScreen.formatChat.

Proven:

  • python3 tools/port_ledger.py build --jar 26.3-client.jar --jar 26.3-server.jar (76807 vanilla methods), then python3 tools/port_ledger.py map-check tools/port_map/client2-013.tsv -> 111 rows, no problems. The check resolves every where to a file and a function in the tree and every row's class and method in the vanilla index, so it covers the whole file after the change.

Not proven. No cargo test run: the build VM was suspended (machine_cooldown) for this stretch, so cargo test -q -p horizon-client --lib key_focus and -p horizon-client-input --lib gamepad were not run here; CI covers them. I did not run the game.


🔄 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/7049 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/port-map-client2-013` --- ### 📝 Commits (1) - [`6581029`](https://github.com/horizon-rust/horizon/commit/6581029efea5c98322bb0195fa70a8292adc82de) Port ledger: focus navigation's screen rectangles are ported ### 📊 Changes **1 file changed** (+10 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/client2-013.tsv` (+10 -10) </details> ### 📄 Description Vanilla moves the keyboard focus between widgets with `ScreenRectangle` geometry: `getBorder` (the strip past the screen's edge), `step` and `getBoundInDirection` (the focused edge), `overlaps`/`overlapsInAxis` (targets on the other axis) and `getCenterInAxis` (the second, vaguer pass), driven by the `ScreenAxis`, `ScreenDirection` and `ScreenPosition` enums. **What was wrong.** `tools/port_map/client2-013.tsv` listed nine of them as `missing` with the note "not in Horizon's menus", and the onboarding row still said its screen was missing. Keyboard focus navigation landed in #4638 (`27f948813`); the geometry is `crates/horizon-client-input/src/gamepad.rs`, whose `focus_step_rect` doc already names `nextFocusPathInDirection` and `ScreenRectangle`'s inclusive bounds: | row | now says | | --- | --- | | `ScreenRectangle.step`, `.getBorder` | `port` -> `game/key_focus.rs::edge` (the strip one pixel past the focused edge, or behind the screen when nothing is focused) | | `ScreenRectangle.getBoundInDirection`, `.overlaps`, `.overlapsInAxis` | `inline` -> `gamepad.rs::focus_step_strict` | | `ScreenRectangle.getCenterInAxis` | `inline` -> `gamepad.rs::focus_step_vague` | | `ScreenAxis`, `ScreenDirection`, `ScreenPosition` | `skip:other` with the note that they are `gamepad::Button`'s DPad values and `Rect` bounds, compared directly | | `AccessibilityOnboardingScreen.setInitialFocus` | stays `missing`, but its note no longer claims the onboarding screen is missing: the screen is ported in `title/onboarding.rs`; only the focus starting on the Narrator button is not | `ScreenRectangle.intersection` stays `missing` (a nested clip is still not intersected: `paint` replaces the scissor), as do `GuiSkinRenderer.renderToTexture` and `ChatScreen.formatChat`. **Proven**: - `python3 tools/port_ledger.py build --jar 26.3-client.jar --jar 26.3-server.jar` (76807 vanilla methods), then `python3 tools/port_ledger.py map-check tools/port_map/client2-013.tsv` -> `111 rows, no problems.` The check resolves every `where` to a file and a function in the tree and every row's class and method in the vanilla index, so it covers the whole file after the change. **Not proven.** No `cargo test` run: the build VM was suspended (`machine_cooldown`) for this stretch, so `cargo test -q -p horizon-client --lib key_focus` and `-p horizon-client-input --lib gamepad` were not run here; CI covers them. I did not run the game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:37:17 +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#7295
No description provided.