mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-06 08:39:07 +00:00
See desc for more.
- Update Screenshots. - Display screenshot / notes icon only, if available. - Disable languages with small progress. - Screenshot key is now `Y` instead of `SELECT`.
This commit is contained in:
@@ -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:
|
||||
|
||||
+17
-10
@@ -55,8 +55,8 @@ void StoreUtils::DrawEntryInfo(const std::unique_ptr<Store> &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> &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<StoreEntry> &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<StoreEntry> &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;
|
||||
}
|
||||
@@ -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<StoreEntry> &entry: The Store Entry.
|
||||
int &storeMode: The store mode to properly return back.
|
||||
*/
|
||||
void StoreUtils::ReleaseNotesLogic(int &scrollIndex, const std::unique_ptr<StoreEntry> &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;
|
||||
|
||||
@@ -65,8 +65,10 @@ static const std::vector<std::string> mainStrings = { "LANGUAGE", "SELECT_UNISTO
|
||||
static const std::vector<std::string> 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<std::string> 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<std::string> 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<std::string> 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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user