[PR #449] [MERGED] Pause menu: icons centred and in full colour like vanilla #2573

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

📋 Pull Request Information

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

Base: main ← Head: fix/pause-icon-buttons


📝 Commits (1)

  • 8ca9cda Pause menu: icon sprites centred and untinted like SpriteIconButton

📊 Changes

1 file changed (+4 additions, -9 deletions)

View changed files

📝 crates/horizon-client/src/game/screens.rs (+4 -9)

📄 Description

Fixes #371

What vanilla does
PauseScreen.init builds the icon row from SpriteIconButtons 20 wide with 15×15 sprites. The bug report, feedback and player reporting buttons and FriendsButton are all SpriteIconButton.CenteredIcon.

  • CenteredIcon.extractContents places the sprite at getX() + getWidth() / 2 - spriteWidth / 2 = x + 10 − 7 = x + 3 (integer division), and the same on y.
  • extractSprite blits it with the widget's alpha only, so an inactive button (player reporting with no other players) keeps a full-colour icon.

Horizon drew the sprites at +2, +2 tinted 0xA0A0A0. That made them one pixel up and left, and greyed.

Change (game/screens.rs): the sprite goes at +3, +3, untinted.

Not changed: the buttons stay inactive. Horizon has no ConfirmLinkScreen (bug report, feedback), friends overlay or social interactions screen in the classic style yet. Vanilla shows the first three active.

How it was verified
In game on the Mac mini (offscreen, GUI scale 3), the pause menu's icon row before and after, cropped and scaled ×3: each icon moved one pixel right and one down and now draws in full colour, as in rdbtCVS's vanilla capture.

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/449 **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/pause-icon-buttons` --- ### 📝 Commits (1) - [`8ca9cda`](https://github.com/horizon-rust/horizon/commit/8ca9cda5f690d195a1d1d6006ffd9dc548bc5470) Pause menu: icon sprites centred and untinted like SpriteIconButton ### 📊 Changes **1 file changed** (+4 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/screens.rs` (+4 -9) </details> ### 📄 Description Fixes #371 **What vanilla does** `PauseScreen.init` builds the icon row from `SpriteIconButton`s 20 wide with 15×15 sprites. The bug report, feedback and player reporting buttons and `FriendsButton` are all `SpriteIconButton.CenteredIcon`. - `CenteredIcon.extractContents` places the sprite at `getX() + getWidth() / 2 - spriteWidth / 2` = x + 10 − 7 = **x + 3** (integer division), and the same on y. - `extractSprite` blits it with the widget's alpha only, so an inactive button (player reporting with no other players) keeps a full-colour icon. Horizon drew the sprites at +2, +2 tinted `0xA0A0A0`. That made them one pixel up and left, and greyed. **Change** (`game/screens.rs`): the sprite goes at +3, +3, untinted. Not changed: the buttons stay inactive. Horizon has no ConfirmLinkScreen (bug report, feedback), friends overlay or social interactions screen in the classic style yet. Vanilla shows the first three active. **How it was verified** In game on the Mac mini (offscreen, GUI scale 3), the pause menu's icon row before and after, cropped and scaled ×3: each icon moved one pixel right and one down and now draws in full colour, as in rdbtCVS's vanilla capture. 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:18 +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#2573
No description provided.