Improve FONT_MENU

This commit is contained in:
Agent X 2024-06-21 13:46:24 -04:00
parent 8065e04367
commit 47cccd2a7c
3 changed files with 6 additions and 6 deletions

View File

@ -54,7 +54,7 @@ static void djui_font_title_render_char(char* c) {
u32 ty = index / 16;
extern ALIGNED8 const u8 texture_font_title[];
djui_gfx_render_texture_tile(texture_font_title, 1024, 512, 32, tx * 64, ty * 64, 64, 64, false);
djui_gfx_render_texture_tile(texture_font_title, 1024, 512, 32, tx * 64 - 8, ty * 64 - 4, 64, 64, true);
}
static f32 djui_font_title_char_width(char* text) {
@ -62,7 +62,7 @@ static f32 djui_font_title_char_width(char* text) {
if (c == ' ') { return 0.30f; }
c = djui_unicode_get_base_char(text);
extern const f32 font_title_widths[];
return font_title_widths[(u8)c - '!'];
return font_title_widths[(u8)c - '!'] * 1.1f;
}
static const struct DjuiFont sDjuiFontTitle = {

View File

@ -7,10 +7,10 @@
#define RAINBOW_TEXT_LEN 255
char* sRainbowColors[] = {
"\\#ff4040\\",
"\\#50e750\\",
"\\#50b3ff\\",
"\\#ffef50\\",
"\\#ff3030\\",
"\\#40e740\\",
"\\#40b0ff\\",
"\\#ffef40\\",
};
char sRainbowText[RAINBOW_TEXT_LEN + 1] = { 0 };

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 52 KiB