[PR #445] [MERGED] World list: hovered rows show the join arrow, clicking the icon joins #2569

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

📋 Pull Request Information

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

Base: main ← Head: fix/world-list-join-icon


📝 Commits (1)

  • 9cec0df World list: hovered rows show vanilla's join arrow, a click on the icon joins

📊 Changes

2 files changed (+74 additions, -19 deletions)

View changed files

📝 crates/horizon-client/src/title.rs (+50 -19)
📝 crates/horizon-client/src/title/tests.rs (+24 -0)

📄 Description

Fixes #369

What vanilla does
WorldSelectionList.WorldListEntry.extractContent (singleplayer list): on a hovered row it fills the 32×32 icon with 0xA0909090, then blits world_list/join over it, or world_list/join_highlighted while the pointer is on the icon (SelectableEntry.mouseOverIcon: 0 <= relX < 32 && 0 <= relY < 32). WorldListEntry.mouseClicked joins the world straight away (with the click sound) when the click lands on the icon. A double click anywhere on the row also joins.

Changes (title.rs)

  • world_row_at: the visible row under the pointer and the pointer's position inside the row's content (AbstractSelectionList.getEntryAtPosition). Drawing and clicking both use it.
  • A hovered row gets the dim fill and the join arrow, highlighted over the icon.
  • A click on the icon returns Action::Play (which plays the click sound). Elsewhere on the row a click still selects, and a second click joins, as before.
  • Not included: the warning, error and marked_join arrows for locked, incompatible or outdated worlds. Horizon's list doesn't read those states yet.

How it was verified

  • Unit test clicking_a_world_icon_joins_it_at_once: a click on the icon's last column joins; a click 2 px to its right only selects the row.
  • In game (Mac mini, offscreen, GUI scale 3), using horizon-ctl scroll-at X Y 0 to move the pointer:
    • over the row's text: grey fill and the white join arrow;
    • over the icon: the blue join_highlighted arrow;
    • click-at on the icon: straight into the world (screen: playing).
  • cargo test -p horizon-client --lib title::: 27 passed.

Self-check (fmt, clippy, client tests, parity) for the whole batch: see the last comment.

🤖 Generated with Claude Code


🔄 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/445 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/16/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/world-list-join-icon` --- ### 📝 Commits (1) - [`9cec0df`](https://github.com/horizon-rust/horizon/commit/9cec0dfb45f805dba77c8d2d961b605d5b43ab15) World list: hovered rows show vanilla's join arrow, a click on the icon joins ### 📊 Changes **2 files changed** (+74 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/title.rs` (+50 -19) 📝 `crates/horizon-client/src/title/tests.rs` (+24 -0) </details> ### 📄 Description Fixes #369 **What vanilla does** `WorldSelectionList.WorldListEntry.extractContent` (singleplayer list): on a hovered row it fills the 32×32 icon with `0xA0909090`, then blits `world_list/join` over it, or `world_list/join_highlighted` while the pointer is on the icon (`SelectableEntry.mouseOverIcon`: `0 <= relX < 32 && 0 <= relY < 32`). `WorldListEntry.mouseClicked` joins the world straight away (with the click sound) when the click lands on the icon. A double click anywhere on the row also joins. **Changes** (`title.rs`) - `world_row_at`: the visible row under the pointer and the pointer's position inside the row's content (`AbstractSelectionList.getEntryAtPosition`). Drawing and clicking both use it. - A hovered row gets the dim fill and the join arrow, highlighted over the icon. - A click on the icon returns `Action::Play` (which plays the click sound). Elsewhere on the row a click still selects, and a second click joins, as before. - Not included: the warning, error and `marked_join` arrows for locked, incompatible or outdated worlds. Horizon's list doesn't read those states yet. **How it was verified** - Unit test `clicking_a_world_icon_joins_it_at_once`: a click on the icon's last column joins; a click 2 px to its right only selects the row. - In game (Mac mini, offscreen, GUI scale 3), using horizon-ctl `scroll-at X Y 0` to move the pointer: - over the row's text: grey fill and the white `join` arrow; - over the icon: the blue `join_highlighted` arrow; - `click-at` on the icon: straight into the world (`screen: playing`). - `cargo test -p horizon-client --lib title::`: 27 passed. Self-check (fmt, clippy, client tests, parity) for the whole batch: see the last comment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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:15 +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#2569
No description provided.