fix(ui): remove grey HUD band background and constrain stock badge to pile bounds
Android Release / build-apk (push) Successful in 4m30s
Android Release / build-apk (push) Successful in 4m30s
Bug 1: StockCountBadge was centred 12 px inward from the stock pile's right edge but its half-width of 17 px pushed the right edge 5 px past the pile boundary. On Android (H_GAP_DIVISOR=32, inter-pile gap ~4 px) the badge corner covered the waste pile's left edge at Z=30, making the waste card appear clipped. STOCK_BADGE_INSET.x: -12 → -20 keeps the right edge 3 px inside the stock pile on every device. Bug 2: The top HUD band Node had an opaque dark-grey BackgroundColor sized to HUD_BAND_HEIGHT (64/80 px). With only Tier-1 content (~30 px) visible in typical gameplay the grey block appeared far taller than its content. Removed BackgroundColor from the band entity; layout reservation in compute_layout is unchanged and the bottom action bar retains its own background. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1614,10 +1614,11 @@ fn update_stock_empty_indicator(
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Inset (in pixels) from the top-right corner of the stock pile sprite to
|
||||
/// the centre of the count badge. A small inward offset keeps the chip from
|
||||
/// drifting half-off the card while still reading as "attached" to the
|
||||
/// corner.
|
||||
const STOCK_BADGE_INSET: Vec2 = Vec2::new(-12.0, -8.0);
|
||||
/// the centre of the count badge. Must satisfy `|x| >= STOCK_BADGE_SIZE.x / 2`
|
||||
/// so the badge right edge stays inside the stock pile and never overlaps the
|
||||
/// adjacent waste pile — critical on Android where `H_GAP_DIVISOR = 32` gives
|
||||
/// an inter-pile gap of only ~4 px.
|
||||
const STOCK_BADGE_INSET: Vec2 = Vec2::new(-20.0, -8.0);
|
||||
|
||||
/// Width / height of the badge background sprite, in world pixels. Sized so
|
||||
/// a 2-digit count (max "24") fits comfortably with `TYPE_BODY` (14 pt) text.
|
||||
|
||||
Reference in New Issue
Block a user