From 3091371464acf1bab61670857c1581672e197b84 Mon Sep 17 00:00:00 2001 From: Joel16 Date: Tue, 31 Jul 2018 18:08:33 -0500 Subject: [PATCH] Fix text alignment --- console/source/main.c | 2 +- gui/source/menu_control.c | 2 +- gui/source/menus.c | 18 +++++++++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/console/source/main.c b/console/source/main.c index fd9aeae..8b901df 100644 --- a/console/source/main.c +++ b/console/source/main.c @@ -189,7 +189,7 @@ int main(int argc, char *argv[]) printf("\x1b[33;1m*\x1b[0m Kernel version: \x1b[33;1m%s\n", Kernel_GetVersion(0)); printf("\x1b[33;1m*\x1b[0m Firm version: \x1b[33;1m%s\n", Kernel_GetVersion(1)); - printf("\x1b[33;1m*\x1b[0m System version: \x1b[33;1m%s\n\n", Kernel_GetVersion(3)); + printf("\x1b[33;1m*\x1b[0m System version: \x1b[33;1m%s\n", Kernel_GetVersion(3)); printf("\x1b[33;1m*\x1b[0m Initial System version: \x1b[33;1m%s\n\n", Kernel_GetVersion(2)); //=====================================================================// diff --git a/gui/source/menu_control.c b/gui/source/menu_control.c index 3d9479c..60d046f 100644 --- a/gui/source/menu_control.c +++ b/gui/source/menu_control.c @@ -62,7 +62,7 @@ void Menu_Controls(void) Draw_Rect(115, 122, 190, 5, C2D_Color32(219, 219, 219, 255)); Draw_Rect(115, 122, ((_3dSliderPercent / 100) * 190), 5, C2D_Color32(241, 122, 74, 255)); - Draw_Textf(90, 138, 0.45f, C2D_Color32(77, 76, 74, 255), "Use home button to exit."); + Draw_Textf(90, 138, 0.45f, C2D_Color32(77, 76, 74, 255), "Press START + SELECT to return."); Draw_Image(btn_home, 180, 215); diff --git a/gui/source/menus.c b/gui/source/menus.c index 9f2e71d..8d9e63c 100644 --- a/gui/source/menus.c +++ b/gui/source/menus.c @@ -344,8 +344,10 @@ void Menu_Main(void) nand_titles = Misc_TitleCount(MEDIATYPE_NAND); tickets = Misc_TicketCount(); - float instr_width = 0.0f, instr_height = 0.0f; - Draw_GetTextSize(0.5f, &instr_width, &instr_height, "Press select to hide user-specific info"); + float instr_width = 0.0f, instr_width2 = 0.0f, instr_width3 = 0.0f, instr_height = 0.0f; + Draw_GetTextSize(0.5f, &instr_width, &instr_height, "Press select to hide user-specific info."); + Draw_GetTextSize(0.5f, &instr_width2, NULL, "Press L + R to capture a screenshot."); + Draw_GetTextSize(0.5f, &instr_width3, NULL, "Press START + SELECT to use button tester."); while (aptMainLoop()) { @@ -389,9 +391,9 @@ void Menu_Main(void) Menu_Misc(); break; case 9: - Draw_Text((400 - instr_width) / 2, (240 - instr_height) / 2, 0.5f, MENU_INFO_TITLE_COLOUR, "Press select to hide user-specific info"); - Draw_Text((400 - instr_width) / 2, ((240 - instr_height) / 2) + 18, 0.5f, MENU_INFO_TITLE_COLOUR, " Press L + R to capture a screenshot "); - Draw_Text((400 - instr_width) / 2, ((240 - instr_height) / 2) + 36, 0.5f, MENU_INFO_TITLE_COLOUR, "Press START + SELECT to use button test"); + Draw_Text((400 - instr_width) / 2, (240 - instr_height) / 2, 0.5f, MENU_INFO_TITLE_COLOUR, "Press select to hide user-specific info."); + Draw_Text((400 - instr_width2) / 2, ((240 - instr_height) / 2) + 18, 0.5f, MENU_INFO_TITLE_COLOUR, "Press L + R to capture a screenshot."); + Draw_Text((400 - instr_width3) / 2, ((240 - instr_height) / 2) + 36, 0.5f, MENU_INFO_TITLE_COLOUR, "Press START + SELECT to use button tester."); break; } @@ -439,6 +441,12 @@ void Menu_Main(void) if (((kHeld & KEY_START) && (kDown & KEY_SELECT)) || ((kHeld & KEY_SELECT) && (kDown & KEY_START))) MENU_STATE_CONTROLS = true; + if (KEY_DDOWN & KEY_A) + { + if (selection == 9) + longjmp(exitJmp, 1); + } + Menu_Controls(); } }