Added back button
This commit is contained in:
parent
3a2264e4df
commit
f98d33ace2
12
Makefile.pc
12
Makefile.pc
@ -14,7 +14,7 @@ test : pc_main/main.cpp pc_main/pc_launch.c \
|
||||
build_pc/tahoma24.o build_pc/tahoma12.o build_pc/interuimedium20.o build_pc/interuimedium30.o \
|
||||
build_pc/interuiregular14.o build_pc/interuiregular18.o \
|
||||
build_pc/switchicon_questionmark.bin.o build_pc/folder_icon.bin.o \
|
||||
build_pc/button_a_light.bin.o build_pc/button_a_dark.bin.o build_pc/hbmenu_logo_light.bin.o build_pc/hbmenu_logo_dark.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
|
||||
gcc -Wall -O2 -g0 $^ -lsfml-graphics -lsfml-window -lsfml-system -lstdc++ -lm -I. -Ibuild_pc -o $@
|
||||
|
||||
build_pc/tahoma12.o : data/tahoma12.nxfnt
|
||||
@ -66,6 +66,16 @@ 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 $@)
|
||||
|
@ -276,6 +276,26 @@ void drawTime() {
|
||||
|
||||
}
|
||||
|
||||
void drawBackBtn(menu_s* menu, bool emptyDir) {
|
||||
int x_image = 1280 - 252 - 30;
|
||||
int x_text = 1280 - 216 - 30;
|
||||
|
||||
if(emptyDir) {
|
||||
x_image = 1280 - 126 - 30;
|
||||
x_text = 1280 - 90 - 30;
|
||||
}
|
||||
|
||||
#ifdef SWITCH
|
||||
if (strcmp( menu->dirname, "sdmc:/") != 0)
|
||||
#else
|
||||
if (strcmp( menu->dirname, "/") != 0)
|
||||
#endif
|
||||
{
|
||||
drawImage(x_image, 720 - 48, 32, 32, themeCurrent.buttonBImage, IMAGE_MODE_RGBA32);
|
||||
DrawText(interuiregular18, x_text, 720 - 47, themeCurrent.textColor, "Back");
|
||||
}
|
||||
}
|
||||
|
||||
void menuLoop() {
|
||||
menuEntry_s* me;
|
||||
menu_s* menu = menuGetCurrent();
|
||||
@ -299,9 +319,11 @@ void menuLoop() {
|
||||
|
||||
//drawTime();
|
||||
|
||||
|
||||
if (menu->nEntries==0)
|
||||
{
|
||||
DrawText(interuiregular14, 64, 128, themeCurrent.textColor, textGetString(StrId_NoAppsFound_Msg));
|
||||
drawBackBtn(menu, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -325,5 +347,7 @@ void menuLoop() {
|
||||
|
||||
drawEntry(me, entry_start_x + x, i==menu->curEntry);
|
||||
}
|
||||
|
||||
drawBackBtn(menu, false);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include "theme.h"
|
||||
#include "button_a_light_bin.h"
|
||||
#include "button_a_dark_bin.h"
|
||||
#include "button_a_dark_bin.h"
|
||||
#include "button_b_light_bin.h"
|
||||
#include "button_b_dark_bin.h"
|
||||
#include "hbmenu_logo_light_bin.h"
|
||||
#include "hbmenu_logo_dark_bin.h"
|
||||
|
||||
@ -15,7 +17,8 @@ void themeStartup(ThemePreset preset) {
|
||||
backgroundColor: MakeColor(233, 236, 241, 255),
|
||||
highlightColor: MakeColor(91, 237, 224, 255),
|
||||
enableWaveBlending: 0,
|
||||
buttonAImage: button_a_light_bin,
|
||||
buttonAImage: button_a_light_bin,
|
||||
buttonBImage: button_b_light_bin,
|
||||
hbmenuLogoImage: hbmenu_logo_light_bin
|
||||
};
|
||||
break;
|
||||
@ -30,6 +33,7 @@ void themeStartup(ThemePreset preset) {
|
||||
highlightColor: MakeColor(91, 237, 224, 255),
|
||||
enableWaveBlending: 0,
|
||||
buttonAImage: button_a_dark_bin,
|
||||
buttonBImage: button_b_dark_bin,
|
||||
hbmenuLogoImage: hbmenu_logo_dark_bin
|
||||
};
|
||||
break;
|
||||
|
@ -11,7 +11,8 @@ typedef struct
|
||||
color_t backgroundColor;
|
||||
color_t highlightColor;
|
||||
bool enableWaveBlending;
|
||||
const uint8_t *buttonAImage;
|
||||
const uint8_t *buttonAImage;
|
||||
const uint8_t *buttonBImage;
|
||||
const uint8_t *hbmenuLogoImage;
|
||||
} theme_t;
|
||||
|
||||
|
BIN
data/button_b_dark.bin
Normal file
BIN
data/button_b_dark.bin
Normal file
Binary file not shown.
BIN
data/button_b_light.bin
Normal file
BIN
data/button_b_light.bin
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user