fix: bigger UI panels with more spacing between text lines

Character panel:
- Width 44 -> 52, height 44 -> 62
- Text rows spaced 8 apart (was 6) — no more squished text
- HP/XP bars 38 wide (was 32)
- Stats with double space between pairs
- Inventory section at bottom with more room

HUD bar:
- Height 18 -> 28
- Rows at y_top+2, +12, +22 (was +1, +7, +13)

Inventory overlay:
- Slots 12x10 (was 8x6), gap 3 (was 2)
- Panel auto-sizes larger
- Click hitboxes in main.rs updated to match

Fixed depth_shown_in_hud test for new HUD height.

All 171 tests + 14 scenarios pass.
This commit is contained in:
Emil
2026-06-21 19:03:14 +03:00
parent a2db99f900
commit 88892db493
3 changed files with 55 additions and 49 deletions
+8 -5
View File
@@ -51,9 +51,11 @@ fn depth_shown_in_hud() {
let s = setup();
let player = s.game.entities.all()[0].clone();
let mut ui = verbatim::ui::UiLayer::new();
let screen_w = 320;
let screen_h = 100;
ui.draw_hud(
80,
25,
screen_w,
screen_h,
Some(&player),
s.game.tick,
verbatim::world::cell::MaterialId::Sand,
@@ -68,10 +70,11 @@ fn depth_shown_in_hud() {
player.level, player.xp, 0, 0, s.game.depth, s.game.tick
);
let stats_w = verbatim::ui::UiLayer::text_width(&stats);
let stats_x = (80 - stats_w).max(0);
let line: String = (stats_x..80)
let stats_x = (screen_w as i32 - stats_w as i32).max(0);
let y_row3 = screen_h as i32 - 28 + 22;
let line: String = (stats_x as i32..screen_w as i32)
.step_by(3)
.map(|x| ui.get(x, 24).map(|c| c.ch).unwrap_or(' '))
.map(|x| ui.get(x, y_row3).map(|c| c.ch).unwrap_or(' '))
.collect();
assert!(line.contains("D:1"), "HUD should show depth: {}", line);
}