mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Universal-Updater -> DarkStore Part 2
Renamed Strings For DarkStore Made .store Files Useable
This commit is contained in:
@@ -64,10 +64,10 @@ static const std::vector<Structs::ButtonPos> installedPos = {
|
||||
|
||||
const std::string &entryName: The name of the Entry. AKA: The Title Name.
|
||||
int index: The Download index.
|
||||
const std::string &unistoreName: The name of the UniStore filename.
|
||||
const std::string &storeName: The name of the Store filename.
|
||||
const std::string &author: The author of the app.
|
||||
*/
|
||||
static bool CreateShortcut(const std::string &entryName, int index, const std::string &unistoreName, const std::string &author) {
|
||||
static bool CreateShortcut(const std::string &entryName, int index, const std::string &storeName, const std::string &author) {
|
||||
std::string sName = Input::setkbdString(30, Lang::get("ENTER_SHORTCUT_FILENAME"), {});
|
||||
if (sName == "") return false; // Just cancel.
|
||||
std::ofstream out(config->shortcut() + "/" + sName + ".xml", std::ios::binary);
|
||||
@@ -79,7 +79,7 @@ static bool CreateShortcut(const std::string &entryName, int index, const std::s
|
||||
out << " <executable>" << executable << "</executable>" << std::endl;
|
||||
|
||||
/* Arguments. */
|
||||
out << " <arg>\"" << unistoreName << "\" \"" << entryName << "\" \"" << std::to_string(index) << "\"" << "</arg>" << std::endl;
|
||||
out << " <arg>\"" << storeName << "\" \"" << entryName << "\" \"" << std::to_string(index) << "\"" << "</arg>" << std::endl;
|
||||
|
||||
/* Title. */
|
||||
const std::string title = Input::setkbdString(30, Lang::get("ENTER_TITLE_SHORTCUT"), {});
|
||||
@@ -223,7 +223,7 @@ void StoreUtils::DownloadHandle(const std::unique_ptr<StoreEntry> &entry, const
|
||||
if (touching(touch, installedPos[i])) {
|
||||
if (i + StoreUtils::store->GetDownloadSIndex() < (int)entries.size()) {
|
||||
if (installs[i + StoreUtils::store->GetDownloadSIndex()]) {
|
||||
StoreUtils::meta->RemoveInstalled(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle(), entries[i + StoreUtils::store->GetDownloadSIndex()]);
|
||||
StoreUtils::meta->RemoveInstalled(StoreUtils::store->GetStoreTitle(), entry->GetTitle(), entries[i + StoreUtils::store->GetDownloadSIndex()]);
|
||||
installs[i + StoreUtils::store->GetDownloadSIndex()] = false;
|
||||
}
|
||||
}
|
||||
@@ -241,7 +241,7 @@ void StoreUtils::DownloadHandle(const std::unique_ptr<StoreEntry> &entry, const
|
||||
|
||||
if (hDown & KEY_X && !entries.empty()) {
|
||||
if (installs[StoreUtils::store->GetDownloadIndex()]) {
|
||||
StoreUtils::meta->RemoveInstalled(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle(), entries[StoreUtils::store->GetDownloadIndex()]);
|
||||
StoreUtils::meta->RemoveInstalled(StoreUtils::store->GetStoreTitle(), entry->GetTitle(), entries[StoreUtils::store->GetDownloadIndex()]);
|
||||
installs[StoreUtils::store->GetDownloadIndex()] = false;
|
||||
}
|
||||
}
|
||||
|
||||
+15
-15
@@ -91,34 +91,34 @@ void StoreUtils::MarkHandle(std::unique_ptr<StoreEntry> &entry, bool &showMark)
|
||||
if (hidKeysDown() & KEY_TOUCH) {
|
||||
/* Star. */
|
||||
if (touching(t, markBox[0])) {
|
||||
StoreUtils::meta->SetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle(),
|
||||
StoreUtils::meta->GetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle()) ^ favoriteMarks::STAR);
|
||||
entry->SetMark(StoreUtils::meta->GetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle()));
|
||||
StoreUtils::meta->SetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle(),
|
||||
StoreUtils::meta->GetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle()) ^ favoriteMarks::STAR);
|
||||
entry->SetMark(StoreUtils::meta->GetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle()));
|
||||
|
||||
/* Heart. */
|
||||
} else if (touching(t, markBox[1])) {
|
||||
StoreUtils::meta->SetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle(),
|
||||
StoreUtils::meta->GetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle()) ^ favoriteMarks::HEART);
|
||||
entry->SetMark(StoreUtils::meta->GetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle()));
|
||||
StoreUtils::meta->SetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle(),
|
||||
StoreUtils::meta->GetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle()) ^ favoriteMarks::HEART);
|
||||
entry->SetMark(StoreUtils::meta->GetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle()));
|
||||
|
||||
/* Diamond. */
|
||||
} else if (touching(t, markBox[2])) {
|
||||
StoreUtils::meta->SetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle(),
|
||||
StoreUtils::meta->GetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle()) ^ favoriteMarks::DIAMOND);
|
||||
entry->SetMark(StoreUtils::meta->GetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle()));
|
||||
StoreUtils::meta->SetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle(),
|
||||
StoreUtils::meta->GetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle()) ^ favoriteMarks::DIAMOND);
|
||||
entry->SetMark(StoreUtils::meta->GetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle()));
|
||||
|
||||
/* Clubs. */
|
||||
} else if (touching(t, markBox[3])) {
|
||||
StoreUtils::meta->SetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle(),
|
||||
StoreUtils::meta->GetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle()) ^ favoriteMarks::CLUBS);
|
||||
entry->SetMark(StoreUtils::meta->GetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle()));
|
||||
StoreUtils::meta->SetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle(),
|
||||
StoreUtils::meta->GetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle()) ^ favoriteMarks::CLUBS);
|
||||
entry->SetMark(StoreUtils::meta->GetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle()));
|
||||
|
||||
/* Spade. */
|
||||
} else if (touching(t, markBox[4])) {
|
||||
StoreUtils::meta->SetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle(),
|
||||
StoreUtils::meta->GetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle()) ^ favoriteMarks::SPADE);
|
||||
StoreUtils::meta->SetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle(),
|
||||
StoreUtils::meta->GetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle()) ^ favoriteMarks::SPADE);
|
||||
|
||||
entry->SetMark(StoreUtils::meta->GetMarks(StoreUtils::store->GetUniStoreTitle(), entry->GetTitle()));
|
||||
entry->SetMark(StoreUtils::meta->GetMarks(StoreUtils::store->GetStoreTitle(), entry->GetTitle()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ void StoreUtils::DrawSearchMenu(const std::vector<bool> &searchIncludes, const s
|
||||
Here you can..
|
||||
|
||||
- Filter your apps for the marks.
|
||||
- Search the UniStore.
|
||||
- Search the Store.
|
||||
- Include stuff into the search.
|
||||
|
||||
std::vector<bool> &searchIncludes: Reference to the searchIncludes.
|
||||
|
||||
+10
-10
@@ -81,7 +81,7 @@ static const Structs::ButtonPos back = { 45, 0, 24, 24 }; // Back arrow for dire
|
||||
static const Structs::ButtonPos Theme = { 40, 196, 280, 24 }; // Themes.
|
||||
|
||||
|
||||
static const std::vector<std::string> mainStrings = { "LANGUAGE", "SELECT_UNISTORE", "AUTO_UPDATE_SETTINGS_BTN", "GUI_SETTINGS_BTN", "DIRECTORY_SETTINGS_BTN", "CREDITS", "EXIT_APP" };
|
||||
static const std::vector<std::string> mainStrings = { "LANGUAGE", "SELECT_STORE", "AUTO_UPDATE_SETTINGS_BTN", "GUI_SETTINGS_BTN", "DIRECTORY_SETTINGS_BTN", "CREDITS", "EXIT_APP" };
|
||||
static const std::vector<std::string> dirStrings = { "CHANGE_3DSX_PATH", "3DSX_IN_FOLDER", "CHANGE_NDS_PATH", "CHANGE_ARCHIVE_PATH", "CHANGE_SHORTCUT_PATH", "CHANGE_FIRM_PATH" };
|
||||
extern std::vector<std::pair<std::string, std::string>> Themes;
|
||||
|
||||
@@ -163,14 +163,14 @@ static void DrawAutoUpdate(int selection) {
|
||||
|
||||
/* Toggle Boxes. */
|
||||
Gui::Draw_Rect(40, 44, 280, 24, (selection == 0 ? UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
Gui::DrawString(47, 48, 0.5f, UIThemes->TextColor(), Lang::get("AUTO_UPDATE_UNISTORE"), 210, 0, font);
|
||||
Gui::DrawString(47, 48, 0.5f, UIThemes->TextColor(), Lang::get("AUTO_UPDATE_STORE"), 210, 0, font);
|
||||
GFX::DrawToggle(toggleAbles[0].x, toggleAbles[0].y, config->autoupdate());
|
||||
Gui::DrawString(47, 75, 0.4f, UIThemes->TextColor(), Lang::get("AUTO_UPDATE_UNISTORE_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
Gui::DrawString(47, 75, 0.4f, UIThemes->TextColor(), Lang::get("AUTO_UPDATE_STORE_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
|
||||
Gui::Draw_Rect(40, 120, 280, 24, (selection == 1 ? UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
Gui::DrawString(47, 124, 0.5f, UIThemes->TextColor(), Lang::get("AUTO_UPDATE_UU"), 210, 0, font);
|
||||
Gui::DrawString(47, 124, 0.5f, UIThemes->TextColor(), Lang::get("AUTO_UPDATE_DS"), 210, 0, font);
|
||||
GFX::DrawToggle(toggleAbles[1].x, toggleAbles[1].y, config->updatecheck());
|
||||
Gui::DrawString(47, 151, 0.4f, UIThemes->TextColor(), Lang::get("AUTO_UPDATE_UU_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
Gui::DrawString(47, 151, 0.4f, UIThemes->TextColor(), Lang::get("AUTO_UPDATE_DS_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -186,9 +186,9 @@ static void DrawGUISettings(int selection) {
|
||||
Gui::DrawStringCentered(20, 2, 0.6, UIThemes->TextColor(), Lang::get("GUI_SETTINGS"), 248, 0, font);
|
||||
|
||||
Gui::Draw_Rect(40, 44, 280, 24, (selection == 0 ? UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
Gui::DrawString(47, 48, 0.5f, UIThemes->TextColor(), Lang::get("UNISTORE_BG"), 210, 0, font);
|
||||
Gui::DrawString(47, 48, 0.5f, UIThemes->TextColor(), Lang::get("STORE_BG"), 210, 0, font);
|
||||
GFX::DrawToggle(toggleAbles[0].x, toggleAbles[0].y, config->usebg());
|
||||
Gui::DrawString(47, 75, 0.4f, UIThemes->TextColor(), Lang::get("UNISTORE_BG_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
Gui::DrawString(47, 75, 0.4f, UIThemes->TextColor(), Lang::get("STORE_BG_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
|
||||
Gui::Draw_Rect(40, 120, 280, 24, (selection == 1 ? UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
Gui::DrawString(47, 124, 0.5f, UIThemes->TextColor(), Lang::get("CUSTOM_FONT"), 210, 0, font);
|
||||
@@ -207,8 +207,8 @@ static void DrawGUISettings(int selection) {
|
||||
Here you can..
|
||||
|
||||
- Change the Language.
|
||||
- Access the UniStore Manage Handle.
|
||||
- Enable UniStore auto update on boot.
|
||||
- Access the Store Manage Handle.
|
||||
- Enable Store auto update on boot.
|
||||
- Show the Credits.
|
||||
- Exit DarkStore.
|
||||
|
||||
@@ -425,7 +425,7 @@ static void SettingsHandleDir(int &page, int &selection) {
|
||||
|
||||
Here you can..
|
||||
|
||||
- Enable / Disable Automatically updating the UniStore on boot.
|
||||
- Enable / Disable Automatically updating the Store on boot.
|
||||
- Enable / Disable Automatically check for DarkStore updates on boot.
|
||||
|
||||
int &page: Reference to the page.
|
||||
|
||||
Reference in New Issue
Block a user