UX Overhaul (#305)

* Fix bgm checking bug

* Converted install and menu options into button menus rather than combos

* Fix sort order

* Various touch screen changes so that most functions can be done via touch

 * Dim theme list when navigating menus

* Translation framework implemented

* bug when no themes loaded fixed

* Fix theme preview regression introduced in d037691
This commit is contained in:
Alex Taber
2024-05-12 14:24:43 -04:00
committed by GitHub
parent 546d459696
commit a43cbcca74
23 changed files with 1060 additions and 536 deletions

View File

@@ -49,7 +49,7 @@ size_t bin_to_abgr(char ** bufp, size_t size)
return out_size;
}
size_t png_to_abgr(char ** bufp, size_t size)
size_t png_to_abgr(char ** bufp, size_t size, u32 *height)
{
size_t out_size = 0;
if(size < 8 || png_sig_cmp((png_bytep)*bufp, 0, 8))
@@ -70,7 +70,7 @@ size_t png_to_abgr(char ** bufp, size_t size)
png_read_info(png, info);
u32 width = png_get_image_width(png, info);
u32 height = png_get_image_height(png, info);
*height = png_get_image_height(png, info);
png_byte color_type = png_get_color_type(png, info);
png_byte bit_depth = png_get_bit_depth(png, info);
@@ -107,10 +107,10 @@ size_t png_to_abgr(char ** bufp, size_t size)
png_read_update_info(png, info);
row_pointers = malloc(sizeof(png_bytep) * height);
out_size = sizeof(u32) * (width * height);
row_pointers = malloc(sizeof(png_bytep) * *height);
out_size = sizeof(u32) * (width * *height);
u32 * out = malloc(out_size);
for(u32 y = 0; y < height; y++)
for(u32 y = 0; y < *height; y++)
{
row_pointers[y] = (png_bytep)(out + (width * y));
}
@@ -126,4 +126,4 @@ size_t png_to_abgr(char ** bufp, size_t size)
*bufp = (char*)out;
return out_size;
}
}