From ac968a17ae71334f60d37cc7b43131351a754bf9 Mon Sep 17 00:00:00 2001 From: Pk11 Date: Mon, 22 Nov 2021 21:41:22 -0600 Subject: [PATCH] Use the D-Pad characters for the file attributes Also change the buttons a bit, that menu always confused me and I think this makes more sense, can change if wanted though --- arm9/source/fileOperations.cpp | 10 +++++----- arm9/source/language.inl | 8 ++++---- nitrofiles/languages/en-US/language.ini | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arm9/source/fileOperations.cpp b/arm9/source/fileOperations.cpp index 3caebed..033ed72 100644 --- a/arm9/source/fileOperations.cpp +++ b/arm9/source/fileOperations.cpp @@ -245,8 +245,8 @@ void changeFileAttribs(const DirEntry *entry) { strftime(str, sizeof(str), "%Y-%m-%d %H:%M:%S", localtime(&st.st_mtime)); font->printf(0, cursorScreenPos + 3, false, Alignment::left, Palette::white, STR_MODIFIED.c_str(), str); } - font->printf(0, cursorScreenPos + 5, false, Alignment::left, Palette::white, "[%c]↑%-12s[%c]↓%s", (newAttribs & ATTR_READONLY) ? 'X' : ' ', STR_READONLY.c_str(), (newAttribs & ATTR_HIDDEN) ? 'X' : ' ', STR_HIDDEN.c_str()); - font->printf(0, cursorScreenPos + 6, false, Alignment::left, Palette::white, "[%c]→%-12s[%c]←%s", (newAttribs & ATTR_SYSTEM) ? 'X' : ' ', STR_SYSTEM.c_str(), (newAttribs & ATTR_ARCHIVE) ? 'X' : ' ', STR_ARCHIVE.c_str()); + font->printf(0, cursorScreenPos + 5, false, Alignment::left, Palette::white, "[%c]%-13s[%c]%s", (newAttribs & ATTR_READONLY) ? 'X' : ' ', STR_UP_READONLY.c_str(), (newAttribs & ATTR_HIDDEN) ? 'X' : ' ', STR_LEFT_HIDDEN.c_str()); + font->printf(0, cursorScreenPos + 6, false, Alignment::left, Palette::white, "[%c]%-13s[%c]%s", (newAttribs & ATTR_SYSTEM) ? 'X' : ' ', STR_DOWN_SYSTEM.c_str(), (newAttribs & ATTR_ARCHIVE) ? 'X' : ' ', STR_RIGHT_ARCHIVE.c_str()); font->printf(0, cursorScreenPos + 7, false, Alignment::left, Palette::white, "[%c] %s", (newAttribs & ATTR_VOLUME) ? 'X' : ' ', STR_VIRTUAL.c_str()); font->printf(0, cursorScreenPos + 8, false, Alignment::left, Palette::white, STR_UDLR_CHANGE_ATTRIBUTES.c_str()); font->print(0, cursorScreenPos + 10, false, (currentAttribs == newAttribs) ? STR_A_CONTINUE : STR_A_APPLY_B_CANCEL); @@ -268,11 +268,11 @@ void changeFileAttribs(const DirEntry *entry) { if (pressed & KEY_UP) { newAttribs ^= ATTR_READONLY; } else if (pressed & KEY_DOWN) { - newAttribs ^= ATTR_HIDDEN; - } else if (pressed & KEY_RIGHT) { newAttribs ^= ATTR_SYSTEM; - } else if (pressed & KEY_LEFT) { + } else if (pressed & KEY_RIGHT) { newAttribs ^= ATTR_ARCHIVE; + } else if (pressed & KEY_LEFT) { + newAttribs ^= ATTR_HIDDEN; } else if ((pressed & KEY_A) && (currentAttribs != newAttribs)) { FAT_setAttr(entry->name.c_str(), newAttribs); break; diff --git a/arm9/source/language.inl b/arm9/source/language.inl index 12ae18f..cdbc4e9 100644 --- a/arm9/source/language.inl +++ b/arm9/source/language.inl @@ -99,10 +99,10 @@ STRING(LOAD_FONT, "Load font") STRING(FILESIZE, "filesize: %s") STRING(CREATED, "created: %s") STRING(MODIFIED, "modified: %s") -STRING(READONLY, "read-only") // Limit 11 characters -STRING(HIDDEN, "hidden") // Limit 11 characters -STRING(SYSTEM, "system") // Limit 11 characters -STRING(ARCHIVE, "archive") // Limit 11 characters +STRING(UP_READONLY, "\\DUread-only") +STRING(DOWN_SYSTEM, "\\DDsystem") +STRING(LEFT_HIDDEN, "\\DLhidden") +STRING(RIGHT_ARCHIVE, "\\DRarchive") STRING(VIRTUAL, "virtual") // Hex editor diff --git a/nitrofiles/languages/en-US/language.ini b/nitrofiles/languages/en-US/language.ini index 1538f8c..263c4f0 100644 --- a/nitrofiles/languages/en-US/language.ini +++ b/nitrofiles/languages/en-US/language.ini @@ -94,10 +94,10 @@ LOAD_FONT=Load font FILESIZE=filesize: %s CREATED=created: %s MODIFIED=modified: %s -READONLY=read-only -HIDDEN=hidden -SYSTEM=system -ARCHIVE=archive +UP_READONLY=\DUread-only +DOWN_SYSTEM=\DDsystem +LEFT_HIDDEN=\DLhidden +RIGHT_ARCHIVE=\DRarchive VIRTUAL=virtual HEX_EDITOR=Hex Editor