render: implement experimental font change #11

Closed
amr wants to merge 4 commits from amr/rogged:font into main
Showing only changes of commit 0257791e4d - Show all commits

font: tweak sizes of stats

A.M. Rowsell 2026-04-08 09:36:03 -04:00 committed by raf

View file

@ -251,21 +251,21 @@ void render_ui(const Player *p, Font *font) {
// ATK
char atk_text[16];
snprintf(atk_text, sizeof(atk_text), "%d", p->attack);
DrawTextEx(*font, atk_text, (Vector2){stats_x + stat_spacing, stats_y}, 14, norm_space, YELLOW);
DrawTextEx(*font, "ATK", (Vector2){stats_x + stat_spacing, stats_y + 16}, 9, nar_space, text_dim);
DrawTextEx(*font, atk_text, (Vector2){stats_x + stat_spacing, stats_y}, 16, norm_space, YELLOW);
DrawTextEx(*font, "ATK", (Vector2){stats_x + stat_spacing, stats_y + 16}, 12, nar_space, text_dim);
// DEF
char def_text[16];
snprintf(def_text, sizeof(def_text), "%d", p->defense);
DrawTextEx(*font, def_text, (Vector2){stats_x + stat_spacing * 2, stats_y}, 14, norm_space,
DrawTextEx(*font, def_text, (Vector2){stats_x + stat_spacing * 2, stats_y}, 16, norm_space,
(Color){100, 150, 255, 255});
DrawTextEx(*font, "DEF", (Vector2){stats_x + stat_spacing * 2, stats_y + 16}, 9, nar_space, text_dim);
DrawTextEx(*font, "DEF", (Vector2){stats_x + stat_spacing * 2, stats_y + 16}, 12, nar_space, text_dim);
int equip_x = section2_end + 15;
int equip_y = hud_y + 8;
// Weapon slot
DrawTextEx(*font, "WEAPON", (Vector2){equip_x, equip_y}, 9, nar_space, text_dim);
DrawTextEx(*font, "WEAPON", (Vector2){equip_x, equip_y}, 12, nar_space, text_dim);
if (p->has_weapon) {
const char *weapon_name = item_get_name(&p->equipped_weapon);
if (weapon_name) {