package game import "core:fmt" import rl "vendor:raylib" render_overlay :: proc(world: ^World) { rl.DrawRectangle(0, 0, SCREEN_W, OVERLAY_BAR_H, OVERLAY_BAR_COLOR) font_size: i32 = 18 y: i32 = (OVERLAY_BAR_H - font_size) / 2 x: i32 = OVERLAY_PADDING gap: i32 : 16 gold := fmt.ctprintf("Gold: %d", world.gold) rl.DrawText(gold, OVERLAY_PADDING, OVERLAY_PADDING, 18, OVERLAY_GOLD_COLOR) x += rl.MeasureText(gold, font_size) + gap hp := fmt.ctprintf("Health: %d", world.base_health) rl.DrawText(hp, x, y, font_size, OVERLAY_TEXT_COLOR) if world.phase == .Game_Over || world.phase == .Victory { draw_end_screen(world) } }