diff --git a/source/draw.c b/source/draw.c index dd87f19..c233fb5 100644 --- a/source/draw.c +++ b/source/draw.c @@ -181,11 +181,11 @@ bool ShowPrompt(bool ask, const char *format, ...) str_width = GetDrawStringWidth(str); str_height = GetDrawStringHeight(str) + (2 * 10); x = (str_width >= SCREEN_WIDTH_TOP) ? 0 : (SCREEN_WIDTH_TOP - str_width) / 2; - y = (str_height >= SCREEN_HEIGHT) ? 0 : (SCREEN_HEIGHT - (str_height+20)) / 2; + y = (str_height >= SCREEN_HEIGHT) ? 0 : (SCREEN_HEIGHT - str_height) / 2; ClearScreenF(true, false, COLOR_STD_BG); DrawStringF(true, x, y, COLOR_STD_FONT, COLOR_STD_BG, str); - DrawStringF(true, x, y + str_height, COLOR_STD_FONT, COLOR_STD_BG, (ask) ? "( yes, no)" : "( to continue)"); + DrawStringF(true, x, y + str_height - (1*10), COLOR_STD_FONT, COLOR_STD_BG, (ask) ? "( yes, no)" : "( to continue)"); while (true) { u32 pad_state = InputWait(); @@ -226,17 +226,17 @@ bool ShowUnlockSequence(u32 seqlvl, const char *format, ...) { va_end(va); str_width = GetDrawStringWidth(str); - str_height = GetDrawStringHeight(str) + (2 * 10); + str_height = GetDrawStringHeight(str) + (3*10); x = (str_width >= SCREEN_WIDTH_TOP) ? 0 : (SCREEN_WIDTH_TOP - str_width) / 2; - y = (str_height >= SCREEN_HEIGHT) ? 0 : (SCREEN_HEIGHT - (str_height + 30)) / 2; + y = (str_height >= SCREEN_HEIGHT) ? 0 : (SCREEN_HEIGHT - (str_height)) / 2; ClearScreenF(true, false, COLOR_STD_BG); DrawStringF(true, x, y, COLOR_STD_FONT, COLOR_STD_BG, str); - DrawStringF(true, x, y + str_height, COLOR_STD_FONT, COLOR_STD_BG, "To proceed, enter this:"); + DrawStringF(true, x, y + str_height - (2*10), COLOR_STD_FONT, COLOR_STD_BG, "To proceed, enter this:"); while (true) { for (u32 n = 0; n < len; n++) { - DrawStringF(true, x + (n*4*8), y + str_height + 10, + DrawStringF(true, x + (n*4*8), y + str_height - (1*10), (lvl > n) ? seqcolors[seqlvl] : COLOR_GREY, COLOR_STD_BG, "<%c>", seqsymbols[seqlvl][n]); } if (lvl == len) diff --git a/source/godmode.c b/source/godmode.c index 1218c72..3bb18e6 100644 --- a/source/godmode.c +++ b/source/godmode.c @@ -3,22 +3,21 @@ #include "hid.h" #include "fs.h" -#define COLOR_TOP_BAR ((GetWritePermissions() == 0) ? COLOR_WHITE : (GetWritePermissions() == 1) ? COLOR_BRIGHTGREEN : (GetWritePermissions() == 2) ? COLOR_BRIGHTYELLOW : COLOR_BRIGHTRED) +#define COLOR_TOP_BAR ((GetWritePermissions() == 0) ? COLOR_WHITE : (GetWritePermissions() == 1) ? COLOR_BRIGHTGREEN : (GetWritePermissions() == 2) ? COLOR_BRIGHTYELLOW : COLOR_RED) #define COLOR_SIDE_BAR COLOR_DARKGREY #define COLOR_MARKED COLOR_TINTEDYELLOW #define COLOR_FILE COLOR_TINTEDGREEN #define COLOR_DIR COLOR_TINTEDBLUE #define COLOR_ROOT COLOR_GREY -void DrawUserInterface(const char* curr_path, DirEntry* curr_entry, DirStruct* clipboard, bool switched) { +void DrawUserInterface(const char* curr_path, DirEntry* curr_entry, DirStruct* clipboard) { const u32 info_start = 18; static u32 state_prev = 0xFFFFFFFF; u32 state_curr = ((*curr_path) ? (1<<0) : 0) | ((clipboard->n_entries) ? (1<<1) : 0) | - ((switched) ? (1<<2) : 0) | - (GetWritePermissions()<<3); + (GetWritePermissions()<<2); char bytestr0[32]; char bytestr1[32]; @@ -70,21 +69,15 @@ void DrawUserInterface(const char* curr_path, DirEntry* curr_entry, DirStruct* c // bottom: inctruction block char instr[256]; - snprintf(instr, 256, "%s%s%s%s%s%s", - "GodMode 9 v0.0.4\n", // generic start part - (*curr_path && !switched) ? " (hold) - Switch commands\n (+<\x18\x19\x1A\x1B>) - Mark entries\n" : - (*curr_path && switched) ? " (rel.) - Switch commands\n - Make a Screenshot\n" : - " - Make a Screenshot\n", - (!(*curr_path)) ? "" : - (!switched) ? " - DELETE file(s)\n - ADD file(s) to clipboard\n" : - " - RENAME file\n - CREATE directory\n", - (*curr_path) ? "" : - (GetWritePermissions() <= 1) ? " - Unlock EmuNAND writing\n - Unlock SysNAND writing\n" : - (GetWritePermissions() == 2) ? " - Relock EmuNAND writing\n - Unlock SysNAND writing\n" : - " - Relock EmuNAND writing\n - Relock SysNAND writing\n", - (clipboard->n_entries) ? "