Skip to content

adj: finalize HUD with double gradient panels and improved contrast - #57

Merged
theghost1980 merged 1 commit into
mainfrom
codex/finalize-hud-with-double-gradient-panels
Feb 8, 2026
Merged

theghost1980 merged 1 commit into
mainfrom
codex/finalize-hud-with-double-gradient-panels

Conversation

@saturnoTest

Copy link
Copy Markdown
Member

Motivation

  • Improve HUD contrast and depth by introducing a two-layer (outer + inner) gradient panel design using the required Kenney assets.
  • Keep changes small and UI-only while preserving existing gameplay and logic.

Description

  • Add UI_RECTANGLE_GRADIENT_2 and UI_RECTANGLE_GRADIENT_2_PATH in src/assets/kenney.ts and load the image in src/assets/loadKenney.ts so the inner panel asset is available at runtime.
  • Replace the single-frame HUD with an outer background (hudBackground) and a centered inner panel (hudInnerPanel) in src/scenes/GameScene.ts, and remove the previous tint usage so the gradients render directly.
  • Introduce hudOuterPadding and hudInnerMargin, scale them with uiScale, and compute base/inner widths/heights on resize to keep proportions and prevent overlaps.
  • Reposition HUD indicators so all elements (score left, time centered, fish + coin group right) are strictly inside the inner panel and continue to scale/align correctly on viewport resize.

Testing

  • Ran npm run typecheck and it completed successfully.
  • Ran npm run build (TS build + vite build) and it completed successfully.

Codex Task

@saturnoTest
saturnoTest requested a review from a team February 8, 2026 01:22
@theghost1980
theghost1980 merged commit 8699265 into main Feb 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants