diff --git a/render.go b/render.go index 9bfa2d65398a94599213b77bd9bd95cf227b63b4..dfdf3aa2edc10b749951ea59e5318bb091176823 100644 --- a/render.go +++ b/render.go @@ -97,6 +97,8 @@ const cellW = 12 const cellH = 10 const cellGap = 2 + // cellBottom is the y of the bottom-most cell's top edge; loop-invariant. + const cellBottom = VirtualH - cellGap outline := color.RGBA{255, 255, 255, 255} // Role labels in display order (index == int(RoomRole)). @@ -112,9 +114,6 @@ ebitenutil.DebugPrintAt(screen, roleLabels[i], colLeft+4, HudY+4) // Cells stacked bottom-up. Row 0 is at the bottom of the HUD strip. for j := 0; j < s.MaxLevel; j++ { - // Compute y so that row 0 is at the bottom. We allocate space - // starting below the label (label height ~12px). - cellBottom := HudY + (VirtualH - HudY) - cellGap cy := cellBottom - (j+1)*(cellH+cellGap) cx := colLeft + 4