From 34d231c58fb1d379a42bec3cc24a504317f6177e Mon Sep 17 00:00:00 2001 From: JeffRuLz Date: Tue, 25 Sep 2018 15:06:44 -0500 Subject: [PATCH] Delete menus.c --- src/menus.c | 72 ----------------------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 src/menus.c diff --git a/src/menus.c b/src/menus.c deleted file mode 100644 index d954b48..0000000 --- a/src/menus.c +++ /dev/null @@ -1,72 +0,0 @@ -#include "menus.h" - -void keyWait(u32 key) -{ - while (1) - { - swiWaitForVBlank(); - scanKeys(); - - if (keysDown() & key) - break; - } -} - -int choiceBox(char* message) -{ - const int choiceRow = 10; - int cursor = 0; - - consoleSelect(&bottomScreen); - consoleClear(); - - iprintf("%s\n", message); - iprintf("\x1b[%d;0H\tYes\n\tNo\n", choiceRow); - - while (1) - { - swiWaitForVBlank(); - scanKeys(); - - //Clear cursor - iprintf("\x1b[%d;0H ", choiceRow + cursor); - - if (keysDown() & (KEY_UP | KEY_DOWN)) - cursor = !cursor; - - //Print cursor - iprintf("\x1b[%d;0H>", choiceRow + cursor); - - if (keysDown() & (KEY_A | KEY_START)) - break; - - if (keysDown() & KEY_B) - { - cursor = 1; - break; - } - } - - scanKeys(); - return (cursor == 0)? YES: NO; -} - -void messageBox(char* message) -{ - consoleSelect(&bottomScreen); - consoleClear(); - - iprintf("%s\n", message); - iprintf("\nOkay - A\n"); - - while (1) - { - swiWaitForVBlank(); - scanKeys(); - - if (keysDown() & (KEY_A | KEY_START)) - break; - } - - scanKeys(); -} \ No newline at end of file