[pr-feature] FPS line: follow DARNER_PANEL_SEE transparency via overlay blend (and add 100% option) #176

Manually merged
TrustNo1 merged 0 commits from cadfan/Darner:pr/fps-pill-transparency into main 2026-12-04 02:14:13 +00:00
Contributor

Refs #174

Contributor role (optional)

  • Fluxer ID: 1578219648912982022

What it changes

DARNER_PANEL_SEE (F1 -> STATS PANEL -> SEE-THROUGH) currently only blends the F3 stats panel; the FPS pill always copies an opaque background over the game, obscuring any underlying HUD element (health bar, compass, ammo, minimap icons, or LT prompts).

This PR extends the existing super::overlay blend path to the FPS pill:

  • Adds a dedicated PillBlend helper (Buffers::new_pill_blend, RGBA8 sized to (layout.width, layout.pill().1)) so toggling F1 does not recreate or leak menu buffers.
  • In Menu::draw, when DARNER_PANEL_SEE is active, packs the pill via Canvas::pack_see(pitch, theme::BG) and blends via super::overlay::draw (falling back to solid copy if overlay pipeline creation fails).
  • Exposes 100% (solid = 0.0, already supported by overlay.rs) in F1 SEE-THROUGH, updates EN/zh-CN help text, and adds a pack_see alpha unit test.

How it was tested

  • Tested revision: 195e71 (plus combined gameplay test with PR #175 on local merge d2915b)
  • Commands and results:
    • cargo xtask policy — passed (553 files ok)
    • cargo clippy --workspace --all-targets --locked -- -D warnings — passed (0 warnings)
    • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings — passed (0 warnings)
    • cargo test --workspace --exclude darner-shader --locked -- --test-threads=1 — passed (darner-gpu 1,757 passed / 0 failed, 81 ignored; all other non-shader workspace crates passed)
  • Gameplay, when relevant: NVIDIA GeForce RTX 5080 (driver 621.24.0, Windows 10.0.26200), Xbox Series S profile, 1920x1080 fullscreen, DLSS Performance (0.5), DLSS Frame Generation 2x, ray tracing off. Verified SEE-THROUGH: 100% across all 6 positions — underlying health bar, compass, ammo, minimap icons, and LT prompt remain readable through the pill.
  • Before and after, when relevant: N/A (UI overlay blend, no performance claim).
  • Shader wave sizes tested, when relevant: N/A (no game shader translation changes).
  • Coverage gaps: darner-shader test suite excluded (untouched by this PR); Linux/Proton build not tested.

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #154 (touches menu.rs and overlay.rs for the new tabbed F1 skin; leaves the FPS pill opaque), #175 (if #175 merges first, the single hud_x(hud_right()...) call in menu.rs's blended pill path trivially updates to hud_align()).
Refs #174 ## Contributor role (optional) - Fluxer ID: 1578219648912982022 ## What it changes DARNER_PANEL_SEE (F1 -> STATS PANEL -> SEE-THROUGH) currently only blends the F3 stats panel; the FPS pill always copies an opaque background over the game, obscuring any underlying HUD element (health bar, compass, ammo, minimap icons, or LT prompts). This PR extends the existing super::overlay blend path to the FPS pill: - Adds a dedicated PillBlend helper (Buffers::new_pill_blend, RGBA8 sized to (layout.width, layout.pill().1)) so toggling F1 does not recreate or leak menu buffers. - In Menu::draw, when DARNER_PANEL_SEE is active, packs the pill via Canvas::pack_see(pitch, theme::BG) and blends via super::overlay::draw (falling back to solid copy if overlay pipeline creation fails). - Exposes 100% (solid = 0.0, already supported by overlay.rs) in F1 SEE-THROUGH, updates EN/zh-CN help text, and adds a pack_see alpha unit test. ## How it was tested - Tested revision: 195e71 (plus combined gameplay test with PR #175 on local merge d2915b) - Commands and results: - cargo xtask policy — passed (553 files ok) - cargo clippy --workspace --all-targets --locked -- -D warnings — passed (0 warnings) - cargo clippy --workspace --all-targets --all-features --locked -- -D warnings — passed (0 warnings) - cargo test --workspace --exclude darner-shader --locked -- --test-threads=1 — passed (darner-gpu 1,757 passed / 0 failed, 81 ignored; all other non-shader workspace crates passed) - Gameplay, when relevant: NVIDIA GeForce RTX 5080 (driver 621.24.0, Windows 10.0.26200), Xbox Series S profile, 1920x1080 fullscreen, DLSS Performance (0.5), DLSS Frame Generation 2x, ray tracing off. Verified SEE-THROUGH: 100% across all 6 positions — underlying health bar, compass, ammo, minimap icons, and LT prompt remain readable through the pill. - Before and after, when relevant: N/A (UI overlay blend, no performance claim). - Shader wave sizes tested, when relevant: N/A (no game shader translation changes). - Coverage gaps: darner-shader test suite excluded (untouched by this PR); Linux/Proton build not tested. ## Checklist - [x] This PR contains one change based on main. - [x] The diff follows docs/asset-policy.md. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #154 (touches menu.rs and overlay.rs for the new tabbed F1 skin; leaves the FPS pill opaque), #175 (if #175 merges first, the single hud_x(hud_right()...) call in menu.rs's blended pill path trivially updates to hud_align()).
TrustNo1 manually merged commit 731e0bb114 into main 2026-12-04 02:14:13 +00:00
Sign in to join this conversation.
No reviewers
No labels
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
TrustNo1/Darner!176
No description provided.