diff --git a/Makefile.pc b/Makefile.pc index affa6b1..ea24176 100644 --- a/Makefile.pc +++ b/Makefile.pc @@ -24,7 +24,7 @@ test : pc_main/main.cpp pc_main/pc_launch.c \ common/nanojpeg.c common/ui.c common/math.c common/theme.c \ common/netloader.c \ build_pc/invalid_icon.bin.o build_pc/folder_icon.bin.o \ - build_pc/button_a_light.bin.o build_pc/button_a_dark.bin.o build_pc/button_b_light.bin.o build_pc/button_b_dark.bin.o build_pc/hbmenu_logo_light.bin.o build_pc/hbmenu_logo_dark.bin.o \ + build_pc/hbmenu_logo_light.bin.o build_pc/hbmenu_logo_dark.bin.o \ #build_pc/tahoma24.o build_pc/tahoma12.o build_pc/interuimedium20.o build_pc/interuimedium30.o build_pc/interuiregular14.o build_pc/interuiregular18.o gcc -Wall -O2 -g -DVERSION=\"v$(APP_VERSION)\" $(EXTRA_CFLAGS) `pkg-config freetype2 --cflags` $^ -lsfml-graphics -lsfml-window -lsfml-system -lstdc++ `pkg-config freetype2 --libs` -lm -lz $(EXTRA_LDFLAGS) -I. -iquote $(DEVKITPRO)/libnx/include -Ibuild_pc -g -o $@ @@ -68,26 +68,6 @@ build_pc/folder_icon.bin.o : data/folder_icon.bin @echo $(notdir $<) @$(bin2o) -build_pc/button_a_light.bin.o : data/button_a_light.bin - mkdir -p $(dir $@) - @echo $(notdir $<) - @$(bin2o) - -build_pc/button_a_dark.bin.o : data/button_a_dark.bin - mkdir -p $(dir $@) - @echo $(notdir $<) - @$(bin2o) - -build_pc/button_b_light.bin.o : data/button_b_light.bin - mkdir -p $(dir $@) - @echo $(notdir $<) - @$(bin2o) - -build_pc/button_b_dark.bin.o : data/button_b_dark.bin - mkdir -p $(dir $@) - @echo $(notdir $<) - @$(bin2o) - build_pc/hbmenu_logo_light.bin.o : data/hbmenu_logo_light.bin mkdir -p $(dir $@) @echo $(notdir $<) diff --git a/common/font.c b/common/font.c index adba38e..769133a 100644 --- a/common/font.c +++ b/common/font.c @@ -36,6 +36,10 @@ static bool FontSetType(u32 font) scale = 6; break; + case fontscale7: + scale = 7; + break; + case interuimedium30: scale = 8; break; diff --git a/common/font.h b/common/font.h index dcb418c..45ed8fe 100644 --- a/common/font.h +++ b/common/font.h @@ -42,3 +42,4 @@ extern const ffnt_header_t interuiregular18_nxfnt;*/ #define interuimedium30 3//&interuimedium30_nxfnt #define interuiregular14 0//&interuiregular14_nxfnt #define interuiregular18 1//&interuiregular18_nxfnt +#define fontscale7 4 diff --git a/common/menu.c b/common/menu.c index 549d956..e10730e 100644 --- a/common/menu.c +++ b/common/menu.c @@ -347,7 +347,8 @@ void drawBackBtn(menu_s* menu, bool emptyDir) { if (strcmp( menu->dirname, "/") != 0) #endif { - drawImage(x_image, 720 - 48, 32, 32, themeCurrent.buttonBImage, IMAGE_MODE_RGBA32); + //drawImage(x_image, 720 - 48, 32, 32, themeCurrent.buttonBImage, IMAGE_MODE_RGBA32); + DrawText(fontscale7, x_image, 720 - 47 + 26, themeCurrent.textColor, themeCurrent.buttonBText);//Display the 'B' button from SharedFont. DrawText(interuimedium20, x_text, 720 - 47 + 26, themeCurrent.textColor, textGetString(StrId_Actions_Back)); } } @@ -442,11 +443,13 @@ void menuLoop() { if(active_entry != NULL) { if (active_entry->type != ENTRY_TYPE_FOLDER) { - drawImage(1280 - 126 - 30 - 32, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32); + //drawImage(1280 - 126 - 30 - 32, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32); + DrawText(fontscale7, 1280 - 126 - 30 - 32, 720 - 47 + 24, themeCurrent.textColor, themeCurrent.buttonAText);//Display the 'A' button from SharedFont. DrawText(interuiregular18, 1280 - 90 - 30 - 32, 720 - 47 + 24, themeCurrent.textColor, textGetString(StrId_Actions_Launch)); } else { - drawImage(1280 - 126 - 30 - 32, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32); + //drawImage(1280 - 126 - 30 - 32, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32); + DrawText(fontscale7, 1280 - 126 - 30 - 32, 720 - 47 + 24, themeCurrent.textColor, themeCurrent.buttonAText); DrawText(interuiregular18, 1280 - 90 - 30 - 32, 720 - 47 + 24, themeCurrent.textColor, textGetString(StrId_Actions_Open)); } } diff --git a/common/theme.c b/common/theme.c index a11bf46..7334290 100644 --- a/common/theme.c +++ b/common/theme.c @@ -1,8 +1,8 @@ #include "theme.h" -#include "button_a_light_bin.h" +/*#include "button_a_light_bin.h" #include "button_a_dark_bin.h" #include "button_b_light_bin.h" -#include "button_b_dark_bin.h" +#include "button_b_dark_bin.h"*/ #include "hbmenu_logo_light_bin.h" #include "hbmenu_logo_dark_bin.h" @@ -18,8 +18,10 @@ void themeStartup(ThemePreset preset) { .highlightColor = MakeColor(91, 237, 224, 255), .seperatorColor = MakeColor(219, 218, 219, 255), .enableWaveBlending = 0, - .buttonAImage = button_a_light_bin, - .buttonBImage = button_b_light_bin, + .buttonAText = "\uE0E0", + .buttonBText = "\uE0E1", + //.buttonAImage = button_a_light_bin, + //.buttonBImage = button_b_light_bin, .hbmenuLogoImage = hbmenu_logo_light_bin }; break; @@ -34,8 +36,10 @@ void themeStartup(ThemePreset preset) { .highlightColor = MakeColor(91, 237, 224, 255), .seperatorColor = MakeColor(219, 218, 219, 255), .enableWaveBlending = 0, - .buttonAImage = button_a_dark_bin, - .buttonBImage = button_b_dark_bin, + .buttonAText = "\uE0A0", + .buttonBText = "\uE0A1", + //.buttonAImage = button_a_dark_bin, + //.buttonBImage = button_b_dark_bin, .hbmenuLogoImage = hbmenu_logo_dark_bin }; break; diff --git a/common/theme.h b/common/theme.h index ee95166..3c645f5 100644 --- a/common/theme.h +++ b/common/theme.h @@ -13,8 +13,10 @@ typedef struct color_t seperatorColor; color_t activeColor; bool enableWaveBlending; - const uint8_t *buttonAImage; - const uint8_t *buttonBImage; + const char *buttonAText; + const char *buttonBText; + //const uint8_t *buttonAImage; + //const uint8_t *buttonBImage; const uint8_t *hbmenuLogoImage; } theme_t; @@ -26,4 +28,4 @@ typedef enum void themeStartup(ThemePreset preset); -theme_t themeCurrent; \ No newline at end of file +theme_t themeCurrent; diff --git a/data/button_a_dark.bin b/data/unused/button_a_dark.bin similarity index 100% rename from data/button_a_dark.bin rename to data/unused/button_a_dark.bin diff --git a/data/button_a_light.bin b/data/unused/button_a_light.bin similarity index 100% rename from data/button_a_light.bin rename to data/unused/button_a_light.bin diff --git a/data/button_b_dark.bin b/data/unused/button_b_dark.bin similarity index 100% rename from data/button_b_dark.bin rename to data/unused/button_b_dark.bin diff --git a/data/button_b_light.bin b/data/unused/button_b_light.bin similarity index 100% rename from data/button_b_light.bin rename to data/unused/button_b_light.bin