[PR #5884] [MERGED] Advancement toast: draw the task/goal label yellow again #6539

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

📋 Pull Request Information

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

Base: main ← Head: fix/5850-advancement-toast-color


📝 Commits (1)

  • 87fb637 Advancement toast: draw the task/goal label yellow again (#5850)

📊 Changes

1 file changed (+23 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/advancements.rs (+23 -6)

📄 Description

Requested by Ransom · project thread

🤖 Opened by Vaspyyy's AI agent (Claude Code), not by Vaspyyy personally.

What and why

The "Advancement Made!" / "Goal Reached!" label on the advancement toast draws cyan instead of yellow.

397e947fa changed the task/goal label colour from 0xFF00_FFFF to 0xFFFF_FF00. HudBatch::text_styled takes colours packed as hud::rgba, with red in the low byte, so 0xFFFF_FF00 is R=0, G=255, B=255: cyan. The challenge colour (0xFFFF_88FF) is the same in both byte orders, so it never showed the bug.

The label and its colour now come from a small toast_label(frame) built with rgba(...), so the byte order can't get flipped again. A unit test checks the packed bytes.

Fixes #5850

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

AdvancementToast.extractRenderState: the frame label is drawn with -30465 (0xFF88FF, pink) for a challenge and -256 (0xFFFF00, yellow) otherwise. No harness covers toast colours. The new unit test is game::advancements::tests::toast_labels_are_yellow_or_pink.

Other projects' code

none

Self-check

  • cargo test -p horizon-client toast_labels: toast_labels_are_yellow_or_pink ... ok
  • cargo fmt: clean
  • I ran tools/pr_ready.py locally, but against the fork's stale origin/main, so its scope numbers are wrong. In that run rustfmt passed and the workspace tests passed (4005). Clippy couldn't run because this machine's toolchain has no clippy component. I couldn't do a rerun with --base upstream/main here. CI's verify job covers clippy.

Screenshots

Before: see the issue (cyan label). After: the label is yellow again, as it was before 397e947fa. I didn't take an in-game screenshot.

🤖 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/5884 **Author:** [@Vaspyyy](https://github.com/Vaspyyy) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/5850-advancement-toast-color` --- ### 📝 Commits (1) - [`87fb637`](https://github.com/horizon-rust/horizon/commit/87fb63788951274e8a6fb160b406694e02946675) Advancement toast: draw the task/goal label yellow again (#5850) ### 📊 Changes **1 file changed** (+23 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/advancements.rs` (+23 -6) </details> ### 📄 Description <!-- claude-projects-attribution: {"github_login":"Vaspyyy"} --> _Requested by **Ransom** · [project thread](https://claude.ai/code/project/chan_014LE6qsPXZ5YJ26HjaADSTZ?thread=cmsg_014LE6qsPXZ5YJ26HjaADSTZT4GAf2PbHMmtz8zFPVZFqJ)_ > 🤖 Opened by Vaspyyy's AI agent (Claude Code), not by Vaspyyy personally. ## What and why The "Advancement Made!" / "Goal Reached!" label on the advancement toast draws cyan instead of yellow. 397e947fa changed the task/goal label colour from `0xFF00_FFFF` to `0xFFFF_FF00`. `HudBatch::text_styled` takes colours packed as `hud::rgba`, with red in the low byte, so `0xFFFF_FF00` is R=0, G=255, B=255: cyan. The challenge colour (`0xFFFF_88FF`) is the same in both byte orders, so it never showed the bug. The label and its colour now come from a small `toast_label(frame)` built with `rgba(...)`, so the byte order can't get flipped again. A unit test checks the packed bytes. Fixes #5850 ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `AdvancementToast.extractRenderState`: the frame label is drawn with `-30465` (0xFF88FF, pink) for a challenge and `-256` (0xFFFF00, yellow) otherwise. No harness covers toast colours. The new unit test is `game::advancements::tests::toast_labels_are_yellow_or_pink`. ## Other projects' code none ## Self-check - `cargo test -p horizon-client toast_labels`: `toast_labels_are_yellow_or_pink ... ok` - `cargo fmt`: clean - I ran `tools/pr_ready.py` locally, but against the fork's stale `origin/main`, so its scope numbers are wrong. In that run rustfmt passed and the workspace tests passed (4005). Clippy couldn't run because this machine's toolchain has no clippy component. I couldn't do a rerun with `--base upstream/main` here. CI's verify job covers clippy. ## Screenshots Before: see the issue (cyan label). After: the label is yellow again, as it was before 397e947fa. I didn't take an in-game screenshot. 🤖 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-03 06:22:37 +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#6539
No description provided.