Switched font, changed the background colour

This commit is contained in:
Adubbz 2018-02-24 12:13:19 +11:00 committed by plutoo
parent 3a415ddaf7
commit 7a991f2f94
12 changed files with 46 additions and 14 deletions

View File

@ -11,7 +11,9 @@ test : pc_main/main.cpp pc_main/pc_launch.c \
common/menu.c common/font.c common/language.c common/launch.c \
common/menu-entry.c common/menu-list.c common/text.c \
common/nanojpeg.c common/ui.c common/math.c common/theme.c \
build_pc/tahoma24.o build_pc/tahoma12.o build_pc/switchicon_questionmark.bin.o build_pc/folder_icon.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 \
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
gcc -Wall -O2 -g0 $^ -lsfml-graphics -lsfml-window -lsfml-system -lstdc++ -I. -Ibuild_pc -o $@
@ -25,6 +27,26 @@ build_pc/tahoma24.o : data/tahoma24.nxfnt
@echo $(notdir $<)
@$(bin2o)
build_pc/interuimedium20.o : data/interuimedium20.nxfnt
mkdir -p $(dir $@)
@echo $(notdir $<)
@$(bin2o)
build_pc/interuimedium30.o : data/interuimedium30.nxfnt
mkdir -p $(dir $@)
@echo $(notdir $<)
@$(bin2o)
build_pc/interuiregular14.o : data/interuiregular14.nxfnt
mkdir -p $(dir $@)
@echo $(notdir $<)
@$(bin2o)
build_pc/interuiregular18.o : data/interuiregular18.nxfnt
mkdir -p $(dir $@)
@echo $(notdir $<)
@$(bin2o)
build_pc/switchicon_questionmark.bin.o : data/switchicon_questionmark.bin
mkdir -p $(dir $@)
@echo $(notdir $<)
@ -55,5 +77,7 @@ build_pc/hbmenu_logo_dark.bin.o : data/hbmenu_logo_dark.bin
@echo $(notdir $<)
@$(bin2o)
clean:
rm -rf build_pc/ test

View File

@ -32,5 +32,13 @@ typedef struct {
extern const ffnt_header_t tahoma24_nxfnt;
extern const ffnt_header_t tahoma12_nxfnt;
extern const ffnt_header_t interuimedium20_nxfnt;
extern const ffnt_header_t interuimedium30_nxfnt;
extern const ffnt_header_t interuiregular14_nxfnt;
extern const ffnt_header_t interuiregular18_nxfnt;
#define tahoma24 &tahoma24_nxfnt
#define tahoma12 &tahoma12_nxfnt
#define interuimedium20 &interuimedium20_nxfnt
#define interuimedium30 &interuimedium30_nxfnt
#define interuiregular14 &interuiregular14_nxfnt
#define interuiregular18 &interuiregular18_nxfnt

View File

@ -178,28 +178,28 @@ static void drawEntry(menuEntry_s* me, int off_x, int is_active) {
}
}
DrawTextTruncate(tahoma12, start_x + 8, start_y + 8, MakeColor(64, 64, 64, 255), me->name, 140 - 32, "...");
DrawTextTruncate(interuiregular14, start_x + 8, start_y + 8, MakeColor(64, 64, 64, 255), me->name, 140 - 32, "...");
if (is_active) {
start_x = 220;
start_y = 135;
DrawText(tahoma24, start_x + 256 + 64, start_y, themeCurrent.textColor, me->name);
DrawText(interuimedium30, start_x + 256 + 64, start_y, themeCurrent.textColor, me->name);
if (me->type != ENTRY_TYPE_FOLDER) {
memset(tmpstr, 0, sizeof(tmpstr));
snprintf(tmpstr, sizeof(tmpstr)-1, "Author: %s", me->author);
DrawText(tahoma12, start_x + 256 + 64, start_y + 28 + 30, themeCurrent.textColor, tmpstr);
DrawText(interuiregular14, start_x + 256 + 64, start_y + 28 + 30, themeCurrent.textColor, tmpstr);
memset(tmpstr, 0, sizeof(tmpstr));
snprintf(tmpstr, sizeof(tmpstr)-1, "Version: %s", me->version);
DrawText(tahoma12, start_x + 256 + 64, start_y + 28 + 30 + 18 + 6, themeCurrent.textColor, tmpstr);
DrawText(interuiregular14, start_x + 256 + 64, start_y + 28 + 30 + 18 + 6, themeCurrent.textColor, tmpstr);
drawImage(1280 - 126, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32);
DrawText(tahoma12, 1280 - 90, 720 - 44, themeCurrent.textColor, "Launch");
drawImage(1280 - 126 - 20, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32);
DrawText(interuimedium20, 1280 - 90 - 20, 720 - 46, themeCurrent.textColor, "Launch");
}
else {
drawImage(1280 - 126, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32);
DrawText(tahoma12, 1280 - 90, 720 - 44, themeCurrent.textColor, "Open");
drawImage(1280 - 126 - 20, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32);
DrawText(interuimedium20, 1280 - 90 - 20, 720 - 47, themeCurrent.textColor, "Open");
}
}
}
@ -270,7 +270,7 @@ void drawTime() {
sprintf(timeString, "%02d:%02d:%02d", hours, minutes, seconds);
DrawText(tahoma24, 1280 - (9 * 16) - 30, 30, MakeColor(255, 255, 255, 255), timeString);
DrawText(interuimedium20, 1280 - (9 * 16) - 30, 30, MakeColor(255, 255, 255, 255), timeString);
}
@ -292,14 +292,14 @@ void menuLoop() {
timer += 0.05;
drawImage(40, 20, 140, 60, themeCurrent.hbmenuLogoImage, IMAGE_MODE_RGBA32);
DrawText(tahoma12, 180, 47, themeCurrent.textColor, "v2.0.0");
DrawText(tahoma12, 40, 720 - 48, themeCurrent.textColor, menu->dirname);
DrawText(interuiregular14, 180, 46, themeCurrent.textColor, "v2.0.0");
DrawText(interuiregular18, 40, 720 - 48, themeCurrent.textColor, menu->dirname);
//drawTime();
if (menu->nEntries==0)
{
DrawText(tahoma12, 64, 128, themeCurrent.textColor, textGetString(StrId_NoAppsFound_Msg));
DrawText(interuiregular14, 64, 128, themeCurrent.textColor, textGetString(StrId_NoAppsFound_Msg));
}
else
{

View File

@ -26,7 +26,7 @@ void themeStartup(ThemePreset preset) {
frontWaveColor: MakeColor(96, 204, 204, 255),
middleWaveColor: MakeColor(66, 154, 159, 255),
backWaveColor: MakeColor(73, 103, 169, 255),
backgroundColor: MakeColor(45, 55, 66, 255),
backgroundColor: MakeColor(45, 45, 50, 255),
highlightColor: MakeColor(129, 137, 236, 255),
enableWaveBlending: 0,
buttonAImage: button_a_dark_bin,

BIN
data/interuimedium20.nxfnt Normal file

Binary file not shown.

BIN
data/interuimedium30.nxfnt Normal file

Binary file not shown.

BIN
data/interuiregular14.nxfnt Normal file

Binary file not shown.

BIN
data/interuiregular18.nxfnt Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.