Improve FONT_MENU
This commit is contained in:
parent
8065e04367
commit
47cccd2a7c
|
@ -54,7 +54,7 @@ static void djui_font_title_render_char(char* c) {
|
||||||
u32 ty = index / 16;
|
u32 ty = index / 16;
|
||||||
|
|
||||||
extern ALIGNED8 const u8 texture_font_title[];
|
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) {
|
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; }
|
if (c == ' ') { return 0.30f; }
|
||||||
c = djui_unicode_get_base_char(text);
|
c = djui_unicode_get_base_char(text);
|
||||||
extern const f32 font_title_widths[];
|
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 = {
|
static const struct DjuiFont sDjuiFontTitle = {
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
#define RAINBOW_TEXT_LEN 255
|
#define RAINBOW_TEXT_LEN 255
|
||||||
|
|
||||||
char* sRainbowColors[] = {
|
char* sRainbowColors[] = {
|
||||||
"\\#ff4040\\",
|
"\\#ff3030\\",
|
||||||
"\\#50e750\\",
|
"\\#40e740\\",
|
||||||
"\\#50b3ff\\",
|
"\\#40b0ff\\",
|
||||||
"\\#ffef50\\",
|
"\\#ffef40\\",
|
||||||
};
|
};
|
||||||
|
|
||||||
char sRainbowText[RAINBOW_TEXT_LEN + 1] = { 0 };
|
char sRainbowText[RAINBOW_TEXT_LEN + 1] = { 0 };
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 52 KiB |
Loading…
Reference in New Issue