Delete menus.c

This commit is contained in:
JeffRuLz 2018-09-25 15:06:44 -05:00 committed by GitHub
parent eb16d0581a
commit 34d231c58f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}