diff --git a/README.md b/README.md index e6c429c..b7087dc 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ To build Universal-Updater from source, you will need to setup devkitARM with li
Screenshots -![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/Credits.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/DirectorySelection.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/DownloadList.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/EntryInfo.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/LanguageSelection.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/ListStyle.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/MarkMenu.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/SearchMenu.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/SettingsMenu.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/SortMenu.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/StoreSelection.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/AutoUpdateSettings.png)![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/DirectorySettings.png)![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/GUISettings.png) +![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/Credits.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/DirectorySelection.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/DownloadList.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/EntryInfo.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/LanguageSelection.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/ListStyle.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/MarkMenu.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/SearchMenu.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/SettingsMenu.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/SortMenu.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/StoreSelection.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/AutoUpdateSettings.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/DirectorySettings.png)![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/GUISettings.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/3DS_Screenshot.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/Screenshot_Zoom0.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/Screenshot_Zoom1.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/Screenshot_Zoom2.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/Keyboard.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/Recommended_UniStores.png) ![](https://github.com/Universal-Team/Universal-Updater/blob/master/resources/ReleaseNotes.png)
diff --git a/include/store/storeUtils.hpp b/include/store/storeUtils.hpp index 2b2a686..f48dfa0 100644 --- a/include/store/storeUtils.hpp +++ b/include/store/storeUtils.hpp @@ -49,7 +49,7 @@ namespace StoreUtils { /* Entry Info. */ void DrawEntryInfo(const std::unique_ptr &store, const std::unique_ptr &entry); - void EntryHandle(bool &showMark, bool &fetch, bool &sFetch, int &mode); + void EntryHandle(bool &showMark, bool &fetch, bool &sFetch, int &mode, const std::unique_ptr &entry); /* Side Menu. */ void DrawSideMenu(int currentMenu); @@ -84,7 +84,7 @@ namespace StoreUtils { /* Release Notes. */ void DrawReleaseNotes(const int &scrollIndex, const std::unique_ptr &entry, const std::unique_ptr &store); - void ReleaseNotesLogic(int &scrollIndex, const std::unique_ptr &entry, int &storeMode); + void ReleaseNotesLogic(int &scrollIndex, int &storeMode); bool compareTitleDescending(const std::unique_ptr &a, const std::unique_ptr &b); bool compareTitleAscending(const std::unique_ptr &a, const std::unique_ptr &b); diff --git a/resources/3DS_Screenshot.png b/resources/3DS_Screenshot.png new file mode 100644 index 0000000..7315c3e Binary files /dev/null and b/resources/3DS_Screenshot.png differ diff --git a/resources/AutoUpdateSettings.png b/resources/AutoUpdateSettings.png index 9285339..097d7fb 100644 Binary files a/resources/AutoUpdateSettings.png and b/resources/AutoUpdateSettings.png differ diff --git a/resources/Credits.png b/resources/Credits.png index 467bad0..26795d3 100644 Binary files a/resources/Credits.png and b/resources/Credits.png differ diff --git a/resources/DirectorySettings.png b/resources/DirectorySettings.png index 441b544..e275268 100644 Binary files a/resources/DirectorySettings.png and b/resources/DirectorySettings.png differ diff --git a/resources/DownloadList.png b/resources/DownloadList.png index 7f9f20e..af894ee 100644 Binary files a/resources/DownloadList.png and b/resources/DownloadList.png differ diff --git a/resources/EntryInfo.png b/resources/EntryInfo.png index b138a4c..4c34192 100644 Binary files a/resources/EntryInfo.png and b/resources/EntryInfo.png differ diff --git a/resources/GUISettings.png b/resources/GUISettings.png index f00c4ce..8bc31ee 100644 Binary files a/resources/GUISettings.png and b/resources/GUISettings.png differ diff --git a/resources/Keyboard.png b/resources/Keyboard.png new file mode 100644 index 0000000..0baa478 Binary files /dev/null and b/resources/Keyboard.png differ diff --git a/resources/LanguageSelection.png b/resources/LanguageSelection.png index 6617239..7cd23d0 100644 Binary files a/resources/LanguageSelection.png and b/resources/LanguageSelection.png differ diff --git a/resources/Recommended_UniStores.png b/resources/Recommended_UniStores.png new file mode 100644 index 0000000..2fe671a Binary files /dev/null and b/resources/Recommended_UniStores.png differ diff --git a/resources/ReleaseNotes.png b/resources/ReleaseNotes.png new file mode 100644 index 0000000..2657da1 Binary files /dev/null and b/resources/ReleaseNotes.png differ diff --git a/resources/Screenshot_Zoom0.png b/resources/Screenshot_Zoom0.png new file mode 100644 index 0000000..23fc4f7 Binary files /dev/null and b/resources/Screenshot_Zoom0.png differ diff --git a/resources/Screenshot_Zoom1.png b/resources/Screenshot_Zoom1.png new file mode 100644 index 0000000..f324cca Binary files /dev/null and b/resources/Screenshot_Zoom1.png differ diff --git a/resources/Screenshot_Zoom2.png b/resources/Screenshot_Zoom2.png new file mode 100644 index 0000000..0fb03ff Binary files /dev/null and b/resources/Screenshot_Zoom2.png differ diff --git a/resources/StoreSelection.png b/resources/StoreSelection.png index fa0ac9f..fe35b03 100644 Binary files a/resources/StoreSelection.png and b/resources/StoreSelection.png differ diff --git a/source/screens/mainScreen.cpp b/source/screens/mainScreen.cpp index abe3352..ce69ac6 100644 --- a/source/screens/mainScreen.cpp +++ b/source/screens/mainScreen.cpp @@ -204,7 +204,7 @@ void MainScreen::Logic(u32 hDown, u32 hHeld, touchPosition touch) { /* Release Notes. */ if (this->storeMode == 6) { - StoreUtils::ReleaseNotesLogic(this->scrollIndex, this->entries[this->store->GetEntry()], this->storeMode); + StoreUtils::ReleaseNotesLogic(this->scrollIndex, this->storeMode); return; } @@ -238,7 +238,7 @@ void MainScreen::Logic(u32 hDown, u32 hHeld, touchPosition touch) { switch(this->storeMode) { case 0: - if (this->store && this->store->GetValid() && this->entries.size() > 0) StoreUtils::EntryHandle(this->showMarks, this->fetchDown, this->screenshotFetch, this->storeMode); + if (this->store && this->store->GetValid() && this->entries.size() > 0) StoreUtils::EntryHandle(this->showMarks, this->fetchDown, this->screenshotFetch, this->storeMode, this->entries[this->store->GetEntry()]); break; case 1: diff --git a/source/store/entryInfo.cpp b/source/store/entryInfo.cpp index e8abd1f..c240c79 100644 --- a/source/store/entryInfo.cpp +++ b/source/store/entryInfo.cpp @@ -55,8 +55,8 @@ void StoreUtils::DrawEntryInfo(const std::unique_ptr &store, const std::u Gui::DrawString(61, 190, 0.45, TEXT_COLOR, Lang::get("LICENSE") + ": " + entry->GetLicense(), 240, 0, font); GFX::DrawBox(btn.x, btn.y, btn.w, btn.h, false); - GFX::DrawSprite(sprites_screenshot_idx, sshot.x, sshot.y); - GFX::DrawSprite(sprites_notes_idx, notes.x, notes.y); + if (!entry->GetScreenshots().empty()) GFX::DrawSprite(sprites_screenshot_idx, sshot.x, sshot.y); + if (entry->GetReleaseNotes() != "") GFX::DrawSprite(sprites_notes_idx, notes.x, notes.y); Gui::DrawString(btn.x + 5, btn.y + 2, 0.6f, TEXT_COLOR, "★", 0, 0, font); } } @@ -72,16 +72,23 @@ void StoreUtils::DrawEntryInfo(const std::unique_ptr &store, const std::u bool &fetch: Reference to fetch, so we know, if we need to fetch, when accessing download list. bool &sFetch: Reference to the screenshot fetch. int &mode: Reference to the Store mode. + const std::unique_ptr &entry: The Store Entry. */ -void StoreUtils::EntryHandle(bool &showMark, bool &fetch, bool &sFetch, int &mode) { - if ((hDown & KEY_START) || (hDown & KEY_TOUCH && touching(touch, btn))) showMark = true; +void StoreUtils::EntryHandle(bool &showMark, bool &fetch, bool &sFetch, int &mode, const std::unique_ptr &entry) { + if (entry) { + if ((hDown & KEY_START) || (hDown & KEY_TOUCH && touching(touch, btn))) showMark = true; - if ((hDown & KEY_SELECT) || (hDown & KEY_TOUCH && touching(touch, sshot))) { - if (checkWifiStatus()) { - sFetch = true; - mode = 5; + if ((hDown & KEY_Y) || (hDown & KEY_TOUCH && touching(touch, sshot))) { + if (!entry->GetScreenshots().empty()) { + if (checkWifiStatus()) { + sFetch = true; + mode = 5; + } + } + } + + if ((hDown & KEY_X) || (hDown & KEY_TOUCH && touching(touch, notes))) { + if (entry->GetReleaseNotes() != "") mode = 6; } } - - if ((hDown & KEY_X) || (hDown & KEY_TOUCH && touching(touch, notes))) mode = 6; } \ No newline at end of file diff --git a/source/store/releaseNotes.cpp b/source/store/releaseNotes.cpp index 3644be5..9851651 100644 --- a/source/store/releaseNotes.cpp +++ b/source/store/releaseNotes.cpp @@ -48,29 +48,18 @@ void StoreUtils::DrawReleaseNotes(const int &scrollIndex, const std::unique_ptr< As the name says: Release notes logic. int &scrollIndex: The scroll index for the Release Notes text. - const std::unique_ptr &entry: The Store Entry. int &storeMode: The store mode to properly return back. */ -void StoreUtils::ReleaseNotesLogic(int &scrollIndex, const std::unique_ptr &entry, int &storeMode) { - if (entry) { - if (hRepeat & KEY_DOWN) { - if (entry->GetReleaseNotes() != "") { // Only scroll if not "". - const int height = Gui::GetStringHeight(0.5f, "", font); - scrollIndex += height; - } - } +void StoreUtils::ReleaseNotesLogic(int &scrollIndex, int &storeMode) { + if (hRepeat & KEY_DOWN) scrollIndex += Gui::GetStringHeight(0.5f, "", font); - if (hRepeat & KEY_UP) { - if (entry->GetReleaseNotes() != "") { // Only scroll if not "". - const int height = Gui::GetStringHeight(0.5f, "", font); - if (scrollIndex > 0) scrollIndex -= height; - } - } + if (hRepeat & KEY_UP) { + if (scrollIndex > 0) scrollIndex -= Gui::GetStringHeight(0.5f, "", font); + } - if (hDown & KEY_B) { - scrollIndex = 0; - storeMode = 0; - } + if (hDown & KEY_B) { + scrollIndex = 0; + storeMode = 0; } } @@ -117,18 +106,10 @@ void DisplayChangelog() { u32 down = hidKeysDown(); /* Scroll Logic. */ - if (repeat & KEY_DOWN) { - if (notes != "") { // Only scroll if not "". - const int height = Gui::GetStringHeight(0.5f, "", font); - scrollIndex += height; - } - } + if (repeat & KEY_DOWN) scrollIndex += Gui::GetStringHeight(0.5f, "", font); if (repeat & KEY_UP) { - if (notes != "") { // Only scroll if not "". - const int height = Gui::GetStringHeight(0.5f, "", font); - if (scrollIndex > 0) scrollIndex -= height; - } + if (scrollIndex > 0) scrollIndex -= Gui::GetStringHeight(0.5f, "", font); } if ((down & KEY_A) || (down & KEY_B) || (down & KEY_START) || (down & KEY_TOUCH)) confirmed = true; diff --git a/source/store/settings.cpp b/source/store/settings.cpp index 69f500f..b6a8d5e 100644 --- a/source/store/settings.cpp +++ b/source/store/settings.cpp @@ -65,8 +65,10 @@ static const std::vector mainStrings = { "LANGUAGE", "SELECT_UNISTO static const std::vector dirStrings = { "CHANGE_3DSX_PATH", "CHANGE_NDS_PATH", "CHANGE_ARCHIVE_PATH", "CHANGE_SHORTCUT_PATH" }; /* Note: Украïнська is spelled using a latin i with dieresis to work in the system font */ -static const std::vector languages = { "Bruh", "Dansk", "Deutsch", "English", "Español", "Français", "Italiano", "Lietuvių", "Magyar", "Polski", "Português", "Português (Brasil)", "Русский", "Украïнська", "日本語" }; -static const std::string langsTemp[] = { "br", "da", "de", "en", "es", "fr", "it", "lt", "hu", "pl", "pt", "pt-BR", "ru", "uk", "jp"}; +//static const std::vector languages = { "Bruh", "Dansk", "Deutsch", "English", "Español", "Français", "Italiano", "Lietuvių", "Magyar", "Polski", "Português", "Português (Brasil)", "Русский", "Украïнська", "日本語" }; +//static const std::string langsTemp[] = { "br", "da", "de", "en", "es", "fr", "it", "lt", "hu", "pl", "pt", "pt-BR", "ru", "uk", "jp"}; +static const std::vector languages = { "Bruh", "Deutsch", "English", "Español", "Français", "Italiano", "Magyar", "Polski", "Português (Brasil)", "Русский", "Украïнська", "日本語" }; +static const std::string langsTemp[] = { "br", "de", "en", "es", "fr", "it", "hu", "pl", "pt-BR", "ru", "uk", "jp"}; /* Main Settings. diff --git a/source/utils/download.cpp b/source/utils/download.cpp index 8a44e98..baeefbf 100644 --- a/source/utils/download.cpp +++ b/source/utils/download.cpp @@ -870,18 +870,10 @@ void UpdateAction() { u32 down = hidKeysDown(); /* Scroll Logic. */ - if (repeat & KEY_DOWN) { - if (res.Notes != "") { // Only scroll if not "". - const int height = Gui::GetStringHeight(0.5f, "", font); - scrollIndex += height; - } - } + if (repeat & KEY_DOWN) scrollIndex += Gui::GetStringHeight(0.5f, "", font); if (repeat & KEY_UP) { - if (res.Notes != "") { // Only scroll if not "". - const int height = Gui::GetStringHeight(0.5f, "", font); - if (scrollIndex > 0) scrollIndex -= height; - } + if (scrollIndex > 0) scrollIndex -= Gui::GetStringHeight(0.5f, "", font); } if ((down & KEY_A) || (down & KEY_B) || (down & KEY_START) || (down & KEY_TOUCH)) confirmed = true;