From 4028963b72a98ddb03083584b6cd99a283cfff3e Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Tue, 16 Oct 2018 16:32:28 -0600 Subject: [PATCH] Fix time text clearing --- arm9/source/driveMenu.cpp | 4 +++- arm9/source/file_browse.cpp | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/arm9/source/driveMenu.cpp b/arm9/source/driveMenu.cpp index 8d62c76..d0ea0d0 100644 --- a/arm9/source/driveMenu.cpp +++ b/arm9/source/driveMenu.cpp @@ -50,8 +50,10 @@ void gbaCartDump(void) { int pressed = 0; printf ("\x1b[0;27H"); - printf (" "); // Clear time + printf ("\x1B[42m"); // Print green color + printf ("_____"); // Clear time consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true); + printf ("\x1B[47m"); // Print foreground white color printf("Dump GBA cart ROM to\n"); printf("\"fat:/gm9i/out\"?\n"); printf("( yes, no)"); diff --git a/arm9/source/file_browse.cpp b/arm9/source/file_browse.cpp index 06a26b1..11117eb 100644 --- a/arm9/source/file_browse.cpp +++ b/arm9/source/file_browse.cpp @@ -185,8 +185,10 @@ int fileBrowse_A(DirEntry* entry, char path[PATH_MAX]) { int maxCursors = -1; printf ("\x1b[0;27H"); - printf (" "); // Clear time + printf ("\x1B[42m"); // Print green color + printf ("_____"); // Clear time consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true); + printf ("\x1B[47m"); // Print foreground white color char fullPath[256]; snprintf(fullPath, sizeof(fullPath), "%s%s", path, entry->name.c_str()); printf(fullPath); @@ -306,8 +308,10 @@ bool fileBrowse_paste(char path[PATH_MAX]) { int maxCursors = -1; printf ("\x1b[0;27H"); - printf (" "); // Clear time + printf ("\x1B[42m"); // Print green color + printf ("_____"); // Clear time consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true); + printf ("\x1B[47m"); // Print foreground white color printf("Paste file here?\n\n"); iprintf ("\x1b[%d;0H", OPTIONS_ENTRIES_START_ROW); maxCursors++; @@ -507,8 +511,10 @@ string browseForFile (void) { // Delete file/folder if ((pressed & KEY_X) && (strcmp (entry->name.c_str(), "..") != 0) && (strncmp (path, "nitro:/", 7) != 0)) { printf ("\x1b[0;27H"); - printf (" "); // Clear time + printf ("\x1B[42m"); // Print green color + printf ("_____"); // Clear time consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true); + printf ("\x1B[47m"); // Print foreground white color iprintf("Delete \"%s\"?\n", entry->name.c_str()); printf ("( yes, no)"); while (true) {