Added back button
This commit is contained in:
parent
6ab17e5e2a
commit
2e4b00f458
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/tahoma24.o build_pc/tahoma12.o build_pc/interuimedium20.o build_pc/interuimedium30.o \
|
||||||
build_pc/interuiregular14.o build_pc/interuiregular18.o \
|
build_pc/interuiregular14.o build_pc/interuiregular18.o \
|
||||||
build_pc/switchicon_questionmark.bin.o build_pc/folder_icon.bin.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 $@
|
gcc -Wall -O2 -g0 $^ -lsfml-graphics -lsfml-window -lsfml-system -lstdc++ -lm -I. -Ibuild_pc -o $@
|
||||||
|
|
||||||
build_pc/tahoma12.o : data/tahoma12.nxfnt
|
build_pc/tahoma12.o : data/tahoma12.nxfnt
|
||||||
@ -67,6 +67,16 @@ build_pc/button_a_dark.bin.o : data/button_a_dark.bin
|
|||||||
@echo $(notdir $<)
|
@echo $(notdir $<)
|
||||||
@$(bin2o)
|
@$(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
|
build_pc/hbmenu_logo_light.bin.o : data/hbmenu_logo_light.bin
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
@echo $(notdir $<)
|
@echo $(notdir $<)
|
||||||
|
@ -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() {
|
void menuLoop() {
|
||||||
menuEntry_s* me;
|
menuEntry_s* me;
|
||||||
menu_s* menu = menuGetCurrent();
|
menu_s* menu = menuGetCurrent();
|
||||||
@ -299,9 +319,11 @@ void menuLoop() {
|
|||||||
|
|
||||||
//drawTime();
|
//drawTime();
|
||||||
|
|
||||||
|
|
||||||
if (menu->nEntries==0)
|
if (menu->nEntries==0)
|
||||||
{
|
{
|
||||||
DrawText(interuiregular14, 64, 128, themeCurrent.textColor, textGetString(StrId_NoAppsFound_Msg));
|
DrawText(interuiregular14, 64, 128, themeCurrent.textColor, textGetString(StrId_NoAppsFound_Msg));
|
||||||
|
drawBackBtn(menu, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -325,5 +347,7 @@ void menuLoop() {
|
|||||||
|
|
||||||
drawEntry(me, entry_start_x + x, i==menu->curEntry);
|
drawEntry(me, entry_start_x + x, i==menu->curEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drawBackBtn(menu, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
#include "button_a_light_bin.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_light_bin.h"
|
||||||
#include "hbmenu_logo_dark_bin.h"
|
#include "hbmenu_logo_dark_bin.h"
|
||||||
|
|
||||||
@ -16,6 +18,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
highlightColor: MakeColor(91, 237, 224, 255),
|
highlightColor: MakeColor(91, 237, 224, 255),
|
||||||
enableWaveBlending: 0,
|
enableWaveBlending: 0,
|
||||||
buttonAImage: button_a_light_bin,
|
buttonAImage: button_a_light_bin,
|
||||||
|
buttonBImage: button_b_light_bin,
|
||||||
hbmenuLogoImage: hbmenu_logo_light_bin
|
hbmenuLogoImage: hbmenu_logo_light_bin
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
@ -30,6 +33,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
highlightColor: MakeColor(91, 237, 224, 255),
|
highlightColor: MakeColor(91, 237, 224, 255),
|
||||||
enableWaveBlending: 0,
|
enableWaveBlending: 0,
|
||||||
buttonAImage: button_a_dark_bin,
|
buttonAImage: button_a_dark_bin,
|
||||||
|
buttonBImage: button_b_dark_bin,
|
||||||
hbmenuLogoImage: hbmenu_logo_dark_bin
|
hbmenuLogoImage: hbmenu_logo_dark_bin
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
@ -12,6 +12,7 @@ typedef struct
|
|||||||
color_t highlightColor;
|
color_t highlightColor;
|
||||||
bool enableWaveBlending;
|
bool enableWaveBlending;
|
||||||
const uint8_t *buttonAImage;
|
const uint8_t *buttonAImage;
|
||||||
|
const uint8_t *buttonBImage;
|
||||||
const uint8_t *hbmenuLogoImage;
|
const uint8_t *hbmenuLogoImage;
|
||||||
} theme_t;
|
} 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