mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Also add Custom Themes to this branch.
I mean, cause why not i guess. xD
This commit is contained in:
@@ -111,17 +111,17 @@ void StoreUtils::DrawDownList(const std::vector<std::string> &entries, bool fetc
|
||||
/* For the Top Screen. */
|
||||
if (StoreUtils::store && StoreUtils::store->GetValid() && !fetch && entry) {
|
||||
if (entries.size() > 0) {
|
||||
Gui::Draw_Rect(0, 174, 400, 66, GFX::Themes[GFX::SelectedTheme].DownListPrev);
|
||||
Gui::Draw_Rect(0, 174, 400, 66, UIThemes->DownListPrev());
|
||||
const C2D_Image tempImg = entry->GetIcon();
|
||||
const uint8_t offsetW = (48 - tempImg.subtex->width) / 2; // Center W.
|
||||
const uint8_t offsetH = (48 - tempImg.subtex->height) / 2; // Center H.
|
||||
C2D_DrawImageAt(tempImg, 9 + offsetW, 174 + 9 + offsetH, 0.5);
|
||||
|
||||
Gui::DrawString(70, 174 + 15, 0.45f, GFX::Themes[GFX::SelectedTheme].TextColor, entries[StoreUtils::store->GetDownloadIndex()], 310, 0, font);
|
||||
Gui::DrawString(70, 174 + 15, 0.45f, UIThemes->TextColor(), entries[StoreUtils::store->GetDownloadIndex()], 310, 0, font);
|
||||
|
||||
if (!sizes.empty()) {
|
||||
if (sizes[StoreUtils::store->GetDownloadIndex()] != "") {
|
||||
Gui::DrawString(70, 174 + 30, 0.45f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("SIZE") + ": " + sizes[StoreUtils::store->GetDownloadIndex()], 310, 0, font);
|
||||
Gui::DrawString(70, 174 + 30, 0.45f, UIThemes->TextColor(), Lang::get("SIZE") + ": " + sizes[StoreUtils::store->GetDownloadIndex()], 310, 0, font);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,15 +132,15 @@ void StoreUtils::DrawDownList(const std::vector<std::string> &entries, bool fetc
|
||||
Animation::QueueEntryDone();
|
||||
|
||||
GFX::DrawBottom();
|
||||
Gui::Draw_Rect(40, 0, 280, 25, GFX::Themes[GFX::SelectedTheme].EntryBar);
|
||||
Gui::Draw_Rect(40, 25, 280, 1, GFX::Themes[GFX::SelectedTheme].EntryOutline);
|
||||
Gui::DrawStringCentered(17, 2, 0.6, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("AVAILABLE_DOWNLOADS"), 273, 0, font);
|
||||
Gui::Draw_Rect(40, 0, 280, 25, UIThemes->EntryBar());
|
||||
Gui::Draw_Rect(40, 25, 280, 1, UIThemes->EntryOutline());
|
||||
Gui::DrawStringCentered(17, 2, 0.6, UIThemes->TextColor(), Lang::get("AVAILABLE_DOWNLOADS"), 273, 0, font);
|
||||
|
||||
if (StoreUtils::store && StoreUtils::store->GetValid() && !fetch && entry) {
|
||||
if (entries.size() > 0) {
|
||||
for (int i = 0; i < DOWNLOAD_ENTRIES && i < (int)entries.size(); i++) {
|
||||
if (StoreUtils::store->GetDownloadIndex() == i + StoreUtils::store->GetDownloadSIndex()) Gui::Draw_Rect(downloadBoxes[i].x, downloadBoxes[i].y, downloadBoxes[i].w, downloadBoxes[i].h, GFX::Themes[GFX::SelectedTheme].MarkSelected);
|
||||
Gui::DrawStringCentered(46 - 160 + (241 / 2), downloadBoxes[i].y + 4, 0.45f, GFX::Themes[GFX::SelectedTheme].TextColor, entries[(i + StoreUtils::store->GetDownloadSIndex())], 235, 0, font);
|
||||
if (StoreUtils::store->GetDownloadIndex() == i + StoreUtils::store->GetDownloadSIndex()) Gui::Draw_Rect(downloadBoxes[i].x, downloadBoxes[i].y, downloadBoxes[i].w, downloadBoxes[i].h, UIThemes->MarkSelected());
|
||||
Gui::DrawStringCentered(46 - 160 + (241 / 2), downloadBoxes[i].y + 4, 0.45f, UIThemes->TextColor(), entries[(i + StoreUtils::store->GetDownloadSIndex())], 235, 0, font);
|
||||
|
||||
if (installs[(i + StoreUtils::store->GetDownloadSIndex())]) GFX::DrawSprite(sprites_installed_idx, installedPos[i].x, installedPos[i].y);
|
||||
}
|
||||
@@ -149,7 +149,7 @@ void StoreUtils::DrawDownList(const std::vector<std::string> &entries, bool fetc
|
||||
|
||||
|
||||
} else { // If no downloads available..
|
||||
Gui::DrawStringCentered(46 - 160 + (241 / 2), downloadBoxes[0].y + 4, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("NO_DOWNLOADS_AVAILABLE"), 235, 0, font);
|
||||
Gui::DrawStringCentered(46 - 160 + (241 / 2), downloadBoxes[0].y + 4, 0.5f, UIThemes->TextColor(), Lang::get("NO_DOWNLOADS_AVAILABLE"), 235, 0, font);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-11
@@ -42,23 +42,23 @@ extern bool QueueRuns;
|
||||
*/
|
||||
void StoreUtils::DrawEntryInfo(const std::unique_ptr<StoreEntry> &entry) {
|
||||
if (StoreUtils::store && entry) { // Ensure, store & entry is not a nullptr.
|
||||
Gui::Draw_Rect(40, 0, 280, 36, GFX::Themes[GFX::SelectedTheme].EntryBar);
|
||||
Gui::Draw_Rect(40, 36, 280, 1, GFX::Themes[GFX::SelectedTheme].EntryOutline);
|
||||
Gui::Draw_Rect(40, 0, 280, 36, UIThemes->EntryBar());
|
||||
Gui::Draw_Rect(40, 36, 280, 1, UIThemes->EntryOutline());
|
||||
|
||||
Gui::DrawStringCentered(17, 0, 0.6, GFX::Themes[GFX::SelectedTheme].TextColor, entry->GetTitle(), 273, 0, font);
|
||||
Gui::DrawStringCentered(17, 20, 0.4, GFX::Themes[GFX::SelectedTheme].TextColor, entry->GetAuthor(), 273, 0, font);
|
||||
Gui::DrawStringCentered(17, 50, 0.4, GFX::Themes[GFX::SelectedTheme].TextColor, entry->GetDescription(), 248, 0, font, C2D_WordWrap);
|
||||
Gui::DrawStringCentered(17, 0, 0.6, UIThemes->TextColor(), entry->GetTitle(), 273, 0, font);
|
||||
Gui::DrawStringCentered(17, 20, 0.4, UIThemes->TextColor(), entry->GetAuthor(), 273, 0, font);
|
||||
Gui::DrawStringCentered(17, 50, 0.4, UIThemes->TextColor(), entry->GetDescription(), 248, 0, font, C2D_WordWrap);
|
||||
|
||||
Gui::DrawString(53, 130, 0.45, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("VERSION") + ": " + entry->GetVersion(), 248, 0, font);
|
||||
Gui::DrawString(53, 145, 0.45, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("CATEGORY") + ": " + entry->GetCategory(), 248, 0, font);
|
||||
Gui::DrawString(53, 160, 0.45, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("CONSOLE") + ": " + entry->GetConsole(), 248, 0, font);
|
||||
Gui::DrawString(53, 175, 0.45, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("LAST_UPDATED") + ": " + entry->GetLastUpdated(), 248, 0, font);
|
||||
Gui::DrawString(53, 190, 0.45, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("LICENSE") + ": " + entry->GetLicense(), 248, 0, font);
|
||||
Gui::DrawString(53, 130, 0.45, UIThemes->TextColor(), Lang::get("VERSION") + ": " + entry->GetVersion(), 248, 0, font);
|
||||
Gui::DrawString(53, 145, 0.45, UIThemes->TextColor(), Lang::get("CATEGORY") + ": " + entry->GetCategory(), 248, 0, font);
|
||||
Gui::DrawString(53, 160, 0.45, UIThemes->TextColor(), Lang::get("CONSOLE") + ": " + entry->GetConsole(), 248, 0, font);
|
||||
Gui::DrawString(53, 175, 0.45, UIThemes->TextColor(), Lang::get("LAST_UPDATED") + ": " + entry->GetLastUpdated(), 248, 0, font);
|
||||
Gui::DrawString(53, 190, 0.45, UIThemes->TextColor(), Lang::get("LICENSE") + ": " + entry->GetLicense(), 248, 0, font);
|
||||
|
||||
GFX::DrawBox(btn.x, btn.y, btn.w, btn.h, false);
|
||||
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, GFX::Themes[GFX::SelectedTheme].TextColor, "★", 0, 0, font);
|
||||
Gui::DrawString(btn.x + 5, btn.y + 2, 0.6f, UIThemes->TextColor(), "★", 0, 0, font);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ void StoreUtils::DrawGrid() {
|
||||
C2D_DrawImageAt(StoreUtils::store->GetStoreImg(), 0, 26, 0.5f, nullptr);
|
||||
|
||||
} else {
|
||||
Gui::Draw_Rect(0, 26, 400, 214, GFX::Themes[GFX::SelectedTheme].BGColor);
|
||||
Gui::Draw_Rect(0, 26, 400, 214, UIThemes->BGColor());
|
||||
}
|
||||
|
||||
for (int i = 0, i2 = 0 + (StoreUtils::store->GetScreenIndx() * 5); i2 < 15 + (StoreUtils::store->GetScreenIndx() * 5) && i2 < (int)StoreUtils::entries.size(); i2++, i++) {
|
||||
|
||||
@@ -42,7 +42,7 @@ void StoreUtils::DrawList() {
|
||||
C2D_DrawImageAt(StoreUtils::store->GetStoreImg(), 0, 26, 0.5f, nullptr);
|
||||
|
||||
} else {
|
||||
Gui::Draw_Rect(0, 26, 400, 214, GFX::Themes[GFX::SelectedTheme].BGColor);
|
||||
Gui::Draw_Rect(0, 26, 400, 214, UIThemes->BGColor());
|
||||
}
|
||||
|
||||
if (StoreUtils::entries.size() > 0) {
|
||||
@@ -63,8 +63,8 @@ void StoreUtils::DrawList() {
|
||||
}
|
||||
|
||||
if (StoreUtils::entries[i + StoreUtils::store->GetScreenIndx()]->GetUpdateAvl()) GFX::DrawSprite(sprites_update_app_idx, StoreBoxesList[i].x + 32, StoreBoxesList[i].y + 32);
|
||||
Gui::DrawStringCentered(29, StoreBoxesList[i].y + 5, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, StoreUtils::entries[i + StoreUtils::store->GetScreenIndx()]->GetTitle(), 300, 0, font);
|
||||
Gui::DrawStringCentered(29, StoreBoxesList[i].y + 24, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, StoreUtils::entries[i + StoreUtils::store->GetScreenIndx()]->GetAuthor(), 300, 0, font);
|
||||
Gui::DrawStringCentered(29, StoreBoxesList[i].y + 5, 0.6f, UIThemes->TextColor(), StoreUtils::entries[i + StoreUtils::store->GetScreenIndx()]->GetTitle(), 300, 0, font);
|
||||
Gui::DrawStringCentered(29, StoreBoxesList[i].y + 24, 0.6f, UIThemes->TextColor(), StoreUtils::entries[i + StoreUtils::store->GetScreenIndx()]->GetAuthor(), 300, 0, font);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-11
@@ -48,28 +48,28 @@ void StoreUtils::DisplayMarkBox(int marks) {
|
||||
Gui::Draw_Rect(0, 0, 320, 240, DIM_COLOR); // Darken.
|
||||
|
||||
Gui::Draw_Rect(markBox[0].x, markBox[0].y, markBox[0].w, markBox[0].h, (marks & favoriteMarks::STAR ?
|
||||
GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
|
||||
Gui::Draw_Rect(markBox[1].x, markBox[1].y, markBox[1].w, markBox[1].h, (marks & favoriteMarks::HEART ?
|
||||
GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
|
||||
Gui::Draw_Rect(markBox[2].x, markBox[2].y, markBox[2].w, markBox[2].h, (marks & favoriteMarks::DIAMOND ?
|
||||
GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
|
||||
Gui::Draw_Rect(markBox[3].x, markBox[3].y, markBox[3].w, markBox[3].h, (marks & favoriteMarks::CLUBS ?
|
||||
GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
|
||||
Gui::Draw_Rect(markBox[4].x, markBox[4].y, markBox[4].w, markBox[4].h, (marks & favoriteMarks::SPADE ?
|
||||
GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
|
||||
Gui::DrawString(markBox[0].x + 15, markBox[0].y + 11, 0.9, GFX::Themes[GFX::SelectedTheme].TextColor, "★", 0, 0, font);
|
||||
Gui::DrawString(markBox[1].x + 15, markBox[1].y + 11, 0.9, GFX::Themes[GFX::SelectedTheme].TextColor, "♥", 0, 0, font);
|
||||
Gui::DrawString(markBox[2].x + 15, markBox[2].y + 11, 0.9, GFX::Themes[GFX::SelectedTheme].TextColor, "♦", 0, 0, font);
|
||||
Gui::DrawString(markBox[3].x + 15, markBox[3].y + 11, 0.9, GFX::Themes[GFX::SelectedTheme].TextColor, "♣", 0, 0, font);
|
||||
Gui::DrawString(markBox[4].x + 15, markBox[4].y + 11, 0.9, GFX::Themes[GFX::SelectedTheme].TextColor, "♠", 0, 0, font);
|
||||
Gui::DrawString(markBox[0].x + 15, markBox[0].y + 11, 0.9, UIThemes->TextColor(), "★", 0, 0, font);
|
||||
Gui::DrawString(markBox[1].x + 15, markBox[1].y + 11, 0.9, UIThemes->TextColor(), "♥", 0, 0, font);
|
||||
Gui::DrawString(markBox[2].x + 15, markBox[2].y + 11, 0.9, UIThemes->TextColor(), "♦", 0, 0, font);
|
||||
Gui::DrawString(markBox[3].x + 15, markBox[3].y + 11, 0.9, UIThemes->TextColor(), "♣", 0, 0, font);
|
||||
Gui::DrawString(markBox[4].x + 15, markBox[4].y + 11, 0.9, UIThemes->TextColor(), "♠", 0, 0, font);
|
||||
|
||||
GFX::DrawBox(markBox[5].x, markBox[5].y, markBox[5].w, markBox[5].h, false);
|
||||
Gui::DrawString(markBox[5].x + 5, markBox[5].y + 2, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, "★", 0, 0, font);
|
||||
Gui::DrawString(markBox[5].x + 5, markBox[5].y + 2, 0.6f, UIThemes->TextColor(), "★", 0, 0, font);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+38
-38
@@ -59,14 +59,14 @@ extern std::deque<std::unique_ptr<Queue>> queueEntries;
|
||||
void DrawStatus(QueueStatus s) {
|
||||
if (!ShowQueueProgress) {
|
||||
if (!queueEntries.empty()) {
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, queueEntries[0]->name, 230, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, UIThemes->TextColor(), queueEntries[0]->name, 230, 0, font);
|
||||
|
||||
char prog[256];
|
||||
snprintf(prog, sizeof(prog), Lang::get("QUEUE_PROGRESS").c_str(), queueEntries[0]->current, queueEntries[0]->total);
|
||||
Gui::DrawString(QueueBoxes[0].x + 241, QueueBoxes[0].y + 68, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, prog, 80, 0, font, C2D_AlignRight);
|
||||
Gui::DrawString(QueueBoxes[0].x + 241, QueueBoxes[0].y + 68, 0.4f, UIThemes->TextColor(), prog, 80, 0, font, C2D_AlignRight);
|
||||
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, GFX::Themes[GFX::SelectedTheme].ProgressbarOut);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60 + 1, QueueBoxes[0].y + 30 + 1, (int)(((float)queueEntries[0]->current / (float)queueEntries[0]->total) * 180.0f), 28, GFX::Themes[GFX::SelectedTheme].ProgressbarIn);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, UIThemes->ProgressbarOut());
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60 + 1, QueueBoxes[0].y + 30 + 1, (int)(((float)queueEntries[0]->current / (float)queueEntries[0]->total) * 180.0f), 28, UIThemes->ProgressbarIn());
|
||||
|
||||
switch(s) {
|
||||
case QueueStatus::Done:
|
||||
@@ -75,31 +75,31 @@ void DrawStatus(QueueStatus s) {
|
||||
break;
|
||||
|
||||
case QueueStatus::Copying:
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("OP_COPYING"), 120, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, UIThemes->TextColor(), Lang::get("OP_COPYING"), 120, 0, font);
|
||||
break;
|
||||
|
||||
case QueueStatus::Deleting:
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("OP_DELETING"), 120, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, UIThemes->TextColor(), Lang::get("OP_DELETING"), 120, 0, font);
|
||||
break;
|
||||
|
||||
case QueueStatus::Downloading:
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("OP_DOWNLOADING"), 120, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, UIThemes->TextColor(), Lang::get("OP_DOWNLOADING"), 120, 0, font);
|
||||
break;
|
||||
|
||||
case QueueStatus::Extracting:
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("OP_EXTRACTING"), 120, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, UIThemes->TextColor(), Lang::get("OP_EXTRACTING"), 120, 0, font);
|
||||
break;
|
||||
|
||||
case QueueStatus::Installing:
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("OP_INSTALLING"), 120, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, UIThemes->TextColor(), Lang::get("OP_INSTALLING"), 120, 0, font);
|
||||
break;
|
||||
|
||||
case QueueStatus::Moving:
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("OP_MOVING"), 120, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, UIThemes->TextColor(), Lang::get("OP_MOVING"), 120, 0, font);
|
||||
break;
|
||||
|
||||
case QueueStatus::Request:
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("OP_WAITING"), 120, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, UIThemes->TextColor(), Lang::get("OP_WAITING"), 120, 0, font);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ void DrawStatus(QueueStatus s) {
|
||||
if (!queueEntries.empty()) {
|
||||
char prog[256];
|
||||
snprintf(prog, sizeof(prog), Lang::get("QUEUE_PROGRESS").c_str(), queueEntries[0]->current, queueEntries[0]->total);
|
||||
Gui::DrawString((QueueBoxes[0].x + 241), QueueBoxes[0].y + 68, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, prog, 80, 0, font, C2D_AlignRight);
|
||||
Gui::DrawString((QueueBoxes[0].x + 241), QueueBoxes[0].y + 68, 0.4f, UIThemes->TextColor(), prog, 80, 0, font, C2D_AlignRight);
|
||||
}
|
||||
|
||||
/* String Handle. */
|
||||
@@ -183,54 +183,54 @@ void DrawStatus(QueueStatus s) {
|
||||
break;
|
||||
|
||||
case QueueStatus::Copying:
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, str, 230, 0, font);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, GFX::Themes[GFX::SelectedTheme].ProgressbarOut);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60 + 1, QueueBoxes[0].y + 30 + 1, (int)(((float)copyOffset / (float)copySize) * 180.0f), 28, GFX::Themes[GFX::SelectedTheme].ProgressbarIn);
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, UIThemes->TextColor(), str, 230, 0, font);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, UIThemes->ProgressbarOut());
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60 + 1, QueueBoxes[0].y + 30 + 1, (int)(((float)copyOffset / (float)copySize) * 180.0f), 28, UIThemes->ProgressbarIn());
|
||||
break;
|
||||
|
||||
case QueueStatus::Deleting:
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, str, 230, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, UIThemes->TextColor(), str, 230, 0, font);
|
||||
break;
|
||||
|
||||
case QueueStatus::Downloading:
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, str, 230, 0, font);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, GFX::Themes[GFX::SelectedTheme].ProgressbarOut);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60 + 1, QueueBoxes[0].y + 30 + 1, (int)(((float)downloadNow / (float)downloadTotal) * 180.0f), 28, GFX::Themes[GFX::SelectedTheme].ProgressbarIn);
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, str2, 120, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, UIThemes->TextColor(), str, 230, 0, font);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, UIThemes->ProgressbarOut());
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60 + 1, QueueBoxes[0].y + 30 + 1, (int)(((float)downloadNow / (float)downloadTotal) * 180.0f), 28, UIThemes->ProgressbarIn());
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, UIThemes->TextColor(), str2, 120, 0, font);
|
||||
break;
|
||||
|
||||
case QueueStatus::Extracting:
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, str, 230, 0, font);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, GFX::Themes[GFX::SelectedTheme].ProgressbarOut);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60 + 1, QueueBoxes[0].y + 30 + 1, (int)(((float)writeOffset / (float)extractSize) * 180.0f), 28, GFX::Themes[GFX::SelectedTheme].ProgressbarIn);
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, str2, 120, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, UIThemes->TextColor(), str, 230, 0, font);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, UIThemes->ProgressbarOut());
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60 + 1, QueueBoxes[0].y + 30 + 1, (int)(((float)writeOffset / (float)extractSize) * 180.0f), 28, UIThemes->ProgressbarIn());
|
||||
Gui::DrawString(QueueBoxes[0].x + 60, QueueBoxes[0].y + 68, 0.4f, UIThemes->TextColor(), str2, 120, 0, font);
|
||||
break;
|
||||
|
||||
case QueueStatus::Installing:
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, str, 230, 0, font);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, GFX::Themes[GFX::SelectedTheme].ProgressbarOut);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60 + 1, QueueBoxes[0].y + 30 + 1, (int)(((float)installOffset / (float)installSize) * 180.0f), 28, GFX::Themes[GFX::SelectedTheme].ProgressbarIn);
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, UIThemes->TextColor(), str, 230, 0, font);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, UIThemes->ProgressbarOut());
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60 + 1, QueueBoxes[0].y + 30 + 1, (int)(((float)installOffset / (float)installSize) * 180.0f), 28, UIThemes->ProgressbarIn());
|
||||
break;
|
||||
|
||||
case QueueStatus::Moving:
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("OP_MOVING"), 230, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, UIThemes->TextColor(), Lang::get("OP_MOVING"), 230, 0, font);
|
||||
break;
|
||||
|
||||
case QueueStatus::Request:
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, str, 230, 0, font);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, GFX::Themes[GFX::SelectedTheme].ProgressbarOut);
|
||||
Gui::DrawStringCentered(QueueBoxes[0].x + 151 - 160, QueueBoxes[0].y + 32, 0.8f, GFX::Themes[GFX::SelectedTheme].TextColor, str2, 180, 0, font);
|
||||
Gui::DrawString(QueueBoxes[0].x + 10, QueueBoxes[0].y + 5, 0.4f, UIThemes->TextColor(), str, 230, 0, font);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x + 60, QueueBoxes[0].y + 30, 182, 30, UIThemes->ProgressbarOut());
|
||||
Gui::DrawStringCentered(QueueBoxes[0].x + 151 - 160, QueueBoxes[0].y + 32, 0.8f, UIThemes->TextColor(), str2, 180, 0, font);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void StoreUtils::DrawQueueMenu(const int queueIndex) {
|
||||
Gui::Draw_Rect(40, 0, 280, 25, GFX::Themes[GFX::SelectedTheme].EntryBar);
|
||||
Gui::Draw_Rect(40, 25, 280, 1, GFX::Themes[GFX::SelectedTheme].EntryOutline);
|
||||
Gui::DrawStringCentered(17, 2, 0.6, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("QUEUE"), 273, 0, font);
|
||||
Gui::Draw_Rect(40, 0, 280, 25, UIThemes->EntryBar());
|
||||
Gui::Draw_Rect(40, 25, 280, 1, UIThemes->EntryOutline());
|
||||
Gui::DrawStringCentered(17, 2, 0.6, UIThemes->TextColor(), Lang::get("QUEUE"), 273, 0, font);
|
||||
|
||||
if (!queueEntries.empty()) {
|
||||
Gui::Draw_Rect(QueueBoxes[0].x, QueueBoxes[0].y, QueueBoxes[0].w, QueueBoxes[0].h, GFX::Themes[GFX::SelectedTheme].MarkSelected);
|
||||
Gui::Draw_Rect(QueueBoxes[0].x, QueueBoxes[0].y, QueueBoxes[0].w, QueueBoxes[0].h, UIThemes->MarkSelected());
|
||||
|
||||
const C2D_Image tempImg = queueEntries[0]->icn;
|
||||
const uint8_t offsetW = (48 - tempImg.subtex->width) / 2; // Center W.
|
||||
@@ -242,16 +242,16 @@ void StoreUtils::DrawQueueMenu(const int queueIndex) {
|
||||
|
||||
/* The next Queue Entries being displayed below. */
|
||||
if ((1 + queueMenuIdx) < (int)queueEntries.size()) {
|
||||
Gui::Draw_Rect(QueueBoxes[1].x, QueueBoxes[1].y, QueueBoxes[1].w, QueueBoxes[1].h, GFX::Themes[GFX::SelectedTheme].MarkUnselected);
|
||||
Gui::Draw_Rect(QueueBoxes[1].x, QueueBoxes[1].y, QueueBoxes[1].w, QueueBoxes[1].h, UIThemes->MarkUnselected());
|
||||
|
||||
const C2D_Image tempImg2 = queueEntries[1 + queueMenuIdx]->icn;
|
||||
const uint8_t offsetW2 = (48 - tempImg2.subtex->width) / 2; // Center W.
|
||||
const uint8_t offsetH2 = (48 - tempImg2.subtex->height) / 2; // Center H.
|
||||
C2D_DrawImageAt(tempImg2, QueueBoxes[1].x + 5 + offsetW2, QueueBoxes[1].y + 21 + offsetH2, 0.5f);
|
||||
|
||||
Gui::DrawString(QueueBoxes[1].x + 10, QueueBoxes[1].y + 5, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, queueEntries[1 + queueMenuIdx]->name, 230, 0, font);
|
||||
Gui::DrawString(QueueBoxes[1].x + 10, QueueBoxes[1].y + 5, 0.4f, UIThemes->TextColor(), queueEntries[1 + queueMenuIdx]->name, 230, 0, font);
|
||||
|
||||
Gui::DrawString(QueueBoxes[1].x + 60, QueueBoxes[1].y + 30, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("QUEUE_POSITION") + ": " + std::to_string(queueMenuIdx + 1), 0, 0, font);
|
||||
Gui::DrawString(QueueBoxes[1].x + 60, QueueBoxes[1].y + 30, 0.4f, UIThemes->TextColor(), Lang::get("QUEUE_POSITION") + ": " + std::to_string(queueMenuIdx + 1), 0, 0, font);
|
||||
|
||||
/* Cancel. */
|
||||
GFX::DrawSprite(sprites_cancel_idx, QueueBoxes[3].x, QueueBoxes[3].y);
|
||||
|
||||
@@ -32,17 +32,17 @@
|
||||
void StoreUtils::DrawReleaseNotes(const int &scrollIndex, const std::unique_ptr<StoreEntry> &entry) {
|
||||
if (entry && StoreUtils::store) {
|
||||
Gui::ScreenDraw(Top);
|
||||
Gui::Draw_Rect(0, 26, 400, 214, GFX::Themes[GFX::SelectedTheme].BGColor);
|
||||
Gui::DrawString(5, 25 - scrollIndex, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, entry->GetReleaseNotes(), 390, 0, font, C2D_WordWrap);
|
||||
Gui::Draw_Rect(0, 0, 400, 25, GFX::Themes[GFX::SelectedTheme].BarColor);
|
||||
Gui::Draw_Rect(0, 25, 400, 1, GFX::Themes[GFX::SelectedTheme].BarOutline);
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, GFX::Themes[GFX::SelectedTheme].TextColor, entry->GetTitle(), 390, 0, font);
|
||||
Gui::Draw_Rect(0, 26, 400, 214, UIThemes->BGColor());
|
||||
Gui::DrawString(5, 25 - scrollIndex, 0.5f, UIThemes->TextColor(), entry->GetReleaseNotes(), 390, 0, font, C2D_WordWrap);
|
||||
Gui::Draw_Rect(0, 0, 400, 25, UIThemes->BarColor());
|
||||
Gui::Draw_Rect(0, 25, 400, 1, UIThemes->BarOutline());
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, UIThemes->TextColor(), entry->GetTitle(), 390, 0, font);
|
||||
|
||||
} else {
|
||||
Gui::ScreenDraw(Top);
|
||||
Gui::Draw_Rect(0, 0, 400, 25, GFX::Themes[GFX::SelectedTheme].BarColor);
|
||||
Gui::Draw_Rect(0, 25, 400, 1, GFX::Themes[GFX::SelectedTheme].BarOutline);
|
||||
Gui::Draw_Rect(0, 26, 400, 214, GFX::Themes[GFX::SelectedTheme].BGColor);
|
||||
Gui::Draw_Rect(0, 0, 400, 25, UIThemes->BarColor());
|
||||
Gui::Draw_Rect(0, 25, 400, 1, UIThemes->BarOutline());
|
||||
Gui::Draw_Rect(0, 26, 400, 214, UIThemes->BGColor());
|
||||
}
|
||||
|
||||
Animation::QueueEntryDone();
|
||||
@@ -89,18 +89,18 @@ void DisplayChangelog() {
|
||||
C2D_TargetClear(Bottom, C2D_Color32(0, 0, 0, 0));
|
||||
|
||||
Gui::ScreenDraw(Top);
|
||||
Gui::Draw_Rect(0, 26, 400, 214, GFX::Themes[GFX::SelectedTheme].BGColor);
|
||||
Gui::DrawString(5, 25 - scrollIndex, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, notes, 390, 0, font, C2D_WordWrap);
|
||||
Gui::Draw_Rect(0, 0, 400, 25, GFX::Themes[GFX::SelectedTheme].BarColor);
|
||||
Gui::Draw_Rect(0, 25, 400, 1, GFX::Themes[GFX::SelectedTheme].BarOutline);
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, GFX::Themes[GFX::SelectedTheme].TextColor, "Universal-Updater", 390, 0, font);
|
||||
Gui::Draw_Rect(0, 215, 400, 25, GFX::Themes[GFX::SelectedTheme].BarColor);
|
||||
Gui::Draw_Rect(0, 214, 400, 1, GFX::Themes[GFX::SelectedTheme].BarOutline);
|
||||
Gui::DrawStringCentered(0, 217, 0.7f, GFX::Themes[GFX::SelectedTheme].TextColor, C_V, 390, 0, font);
|
||||
Gui::Draw_Rect(0, 26, 400, 214, UIThemes->BGColor());
|
||||
Gui::DrawString(5, 25 - scrollIndex, 0.5f, UIThemes->TextColor(), notes, 390, 0, font, C2D_WordWrap);
|
||||
Gui::Draw_Rect(0, 0, 400, 25, UIThemes->BarColor());
|
||||
Gui::Draw_Rect(0, 25, 400, 1, UIThemes->BarOutline());
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, UIThemes->TextColor(), "Universal-Updater", 390, 0, font);
|
||||
Gui::Draw_Rect(0, 215, 400, 25, UIThemes->BarColor());
|
||||
Gui::Draw_Rect(0, 214, 400, 1, UIThemes->BarOutline());
|
||||
Gui::DrawStringCentered(0, 217, 0.7f, UIThemes->TextColor(), C_V, 390, 0, font);
|
||||
|
||||
GFX::DrawBottom();
|
||||
Gui::Draw_Rect(0, 0, 320, 25, GFX::Themes[GFX::SelectedTheme].BarColor);
|
||||
Gui::Draw_Rect(0, 25, 320, 1, GFX::Themes[GFX::SelectedTheme].BarOutline);
|
||||
Gui::Draw_Rect(0, 0, 320, 25, UIThemes->BarColor());
|
||||
Gui::Draw_Rect(0, 25, 320, 1, UIThemes->BarOutline());
|
||||
C3D_FrameEnd(0);
|
||||
|
||||
hidScanInput();
|
||||
|
||||
@@ -45,12 +45,12 @@ extern bool checkWifiStatus();
|
||||
*/
|
||||
void StoreUtils::DrawScreenshotMenu(const C2D_Image &img, const int sIndex, const bool sFetch, const int screenshotSize, const std::string &name, const int zoom, const bool canDisplay) {
|
||||
Gui::ScreenDraw(Top);
|
||||
Gui::Draw_Rect(0, 0, 400, 240, GFX::Themes[GFX::SelectedTheme].BGColor);
|
||||
Gui::Draw_Rect(0, 0, 400, 240, UIThemes->BGColor());
|
||||
|
||||
if (sFetch) {
|
||||
Animation::QueueEntryDone();
|
||||
GFX::DrawBottom();
|
||||
Gui::DrawStringCentered(0, 2, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("LOADING_SCREENSHOT"), 310);
|
||||
Gui::DrawStringCentered(0, 2, 0.6f, UIThemes->TextColor(), Lang::get("LOADING_SCREENSHOT"), 310);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -59,10 +59,10 @@ void StoreUtils::DrawScreenshotMenu(const C2D_Image &img, const int sIndex, cons
|
||||
|
||||
GFX::DrawBottom();
|
||||
if (screenshotSize > 0) { // if texture is nullptr AND screenshot size is larger than 0.
|
||||
Gui::DrawStringCentered(0, 2, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("SCREENSHOT_COULD_NOT_LOAD"), 310);
|
||||
Gui::DrawStringCentered(0, 2, 0.6f, UIThemes->TextColor(), Lang::get("SCREENSHOT_COULD_NOT_LOAD"), 310);
|
||||
|
||||
} else {
|
||||
Gui::DrawStringCentered(0, 2, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("NO_SCREENSHOTS_AVAILABLE"), 310);
|
||||
Gui::DrawStringCentered(0, 2, 0.6f, UIThemes->TextColor(), Lang::get("NO_SCREENSHOTS_AVAILABLE"), 310);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -104,20 +104,20 @@ void StoreUtils::DrawScreenshotMenu(const C2D_Image &img, const int sIndex, cons
|
||||
delete bottom.subtex;
|
||||
|
||||
} else {
|
||||
Gui::Draw_Rect(0, 215, 320, 25, GFX::Themes[GFX::SelectedTheme].BarColor);
|
||||
Gui::Draw_Rect(0, 214, 320, 1, GFX::Themes[GFX::SelectedTheme].BarOutline);
|
||||
Gui::DrawStringCentered(0, 220, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("SCREENSHOT_INSTRUCTIONS"), 310, 0, font);
|
||||
Gui::Draw_Rect(0, 215, 320, 25, UIThemes->BarColor());
|
||||
Gui::Draw_Rect(0, 214, 320, 1, UIThemes->BarOutline());
|
||||
Gui::DrawStringCentered(0, 220, 0.5f, UIThemes->TextColor(), Lang::get("SCREENSHOT_INSTRUCTIONS"), 310, 0, font);
|
||||
|
||||
char screenshots[0x100];
|
||||
snprintf(screenshots, sizeof(screenshots), Lang::get("SCREENSHOT").c_str(), sIndex + 1, screenshotSize);
|
||||
Gui::DrawStringCentered(0, 2, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, screenshots, 310, 0, font);
|
||||
Gui::DrawStringCentered(0, 40, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, name, 310, 0, font);
|
||||
Gui::DrawStringCentered(0, 2, 0.6f, UIThemes->TextColor(), screenshots, 310, 0, font);
|
||||
Gui::DrawStringCentered(0, 40, 0.6f, UIThemes->TextColor(), name, 310, 0, font);
|
||||
}
|
||||
|
||||
} else {
|
||||
Animation::QueueEntryDone();
|
||||
GFX::DrawBottom();
|
||||
Gui::DrawStringCentered(0, 2, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("NO_SCREENSHOTS_AVAILABLE"), 310);
|
||||
Gui::DrawStringCentered(0, 2, 0.6f, UIThemes->TextColor(), Lang::get("NO_SCREENSHOTS_AVAILABLE"), 310);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+29
-29
@@ -65,65 +65,65 @@ static const std::vector<Structs::ButtonPos> SearchMenu = {
|
||||
isAND: isAND for the AND / OR mode.
|
||||
*/
|
||||
void StoreUtils::DrawSearchMenu(const std::vector<bool> &searchIncludes, const std::string &searchResult, int marks, bool updateFilter, bool isAND) {
|
||||
Gui::Draw_Rect(40, 0, 280, 25, GFX::Themes[GFX::SelectedTheme].EntryBar);
|
||||
Gui::Draw_Rect(40, 25, 280, 1, GFX::Themes[GFX::SelectedTheme].EntryOutline);
|
||||
Gui::DrawStringCentered(21, 2, 0.6, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("SEARCH_FILTERS"), 269, 0, font);
|
||||
Gui::Draw_Rect(40, 0, 280, 25, UIThemes->EntryBar());
|
||||
Gui::Draw_Rect(40, 25, 280, 1, UIThemes->EntryOutline());
|
||||
Gui::DrawStringCentered(21, 2, 0.6, UIThemes->TextColor(), Lang::get("SEARCH_FILTERS"), 269, 0, font);
|
||||
|
||||
Gui::Draw_Rect(50, 40, 264, SearchMenu[0].h + 2, GFX::Themes[GFX::SelectedTheme].SearchbarOutline);
|
||||
Gui::Draw_Rect(SearchMenu[0].x, SearchMenu[0].y, SearchMenu[0].w, SearchMenu[0].h, GFX::Themes[GFX::SelectedTheme].SearchBar);
|
||||
Gui::Draw_Rect(50, 40, 264, SearchMenu[0].h + 2, UIThemes->SearchBarOutline());
|
||||
Gui::Draw_Rect(SearchMenu[0].x, SearchMenu[0].y, SearchMenu[0].w, SearchMenu[0].h, UIThemes->SearchBar());
|
||||
|
||||
Gui::DrawStringCentered(24, 46, 0.6, GFX::Themes[GFX::SelectedTheme].TextColor, searchResult, 265, 0, font);
|
||||
Gui::DrawStringCentered(24, 46, 0.6, UIThemes->TextColor(), searchResult, 265, 0, font);
|
||||
|
||||
/* Checkboxes. */
|
||||
for (int i = 0; i < 4; i++) {
|
||||
GFX::DrawCheckbox(SearchMenu[i + 1].x, SearchMenu[i + 1].y, searchIncludes[i]);
|
||||
}
|
||||
|
||||
Gui::DrawString(84, 81, 0.5, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("INCLUDE_IN_RESULTS"), 265, 0, font);
|
||||
Gui::DrawString(84, 81, 0.5, UIThemes->TextColor(), Lang::get("INCLUDE_IN_RESULTS"), 265, 0, font);
|
||||
|
||||
Gui::DrawString(SearchMenu[1].x + 18, SearchMenu[1].y + 1, 0.4, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("TITLE"), 90, 0, font);
|
||||
Gui::DrawString(SearchMenu[2].x + 18, SearchMenu[2].y + 1, 0.4, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("AUTHOR"), 90, 0, font);
|
||||
Gui::DrawString(SearchMenu[1].x + 18, SearchMenu[1].y + 1, 0.4, UIThemes->TextColor(), Lang::get("TITLE"), 90, 0, font);
|
||||
Gui::DrawString(SearchMenu[2].x + 18, SearchMenu[2].y + 1, 0.4, UIThemes->TextColor(), Lang::get("AUTHOR"), 90, 0, font);
|
||||
|
||||
Gui::DrawString(SearchMenu[3].x + 18, SearchMenu[3].y + 1, 0.4, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("CATEGORY"), 90, 0, font);
|
||||
Gui::DrawString(SearchMenu[4].x + 18, SearchMenu[4].y + 1, 0.4, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("CONSOLE"), 90, 0, font);
|
||||
Gui::DrawString(SearchMenu[3].x + 18, SearchMenu[3].y + 1, 0.4, UIThemes->TextColor(), Lang::get("CATEGORY"), 90, 0, font);
|
||||
Gui::DrawString(SearchMenu[4].x + 18, SearchMenu[4].y + 1, 0.4, UIThemes->TextColor(), Lang::get("CONSOLE"), 90, 0, font);
|
||||
|
||||
/* Filters. */
|
||||
Gui::DrawString(84, SearchMenu[5].y - 20, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("FILTER_TO"), 265, 0, font);
|
||||
Gui::DrawString(84, SearchMenu[5].y - 20, 0.5f, UIThemes->TextColor(), Lang::get("FILTER_TO"), 265, 0, font);
|
||||
|
||||
Gui::Draw_Rect(SearchMenu[5].x, SearchMenu[5].y, SearchMenu[5].w, SearchMenu[5].h, (marks & favoriteMarks::STAR ?
|
||||
GFX::Themes[GFX::SelectedTheme].SideBarUnselected : GFX::Themes[GFX::SelectedTheme].BoxInside));
|
||||
UIThemes->SideBarUnselected() : UIThemes->BoxInside()));
|
||||
|
||||
Gui::Draw_Rect(SearchMenu[6].x, SearchMenu[6].y, SearchMenu[6].w, SearchMenu[6].h, (marks & favoriteMarks::HEART ?
|
||||
GFX::Themes[GFX::SelectedTheme].SideBarUnselected : GFX::Themes[GFX::SelectedTheme].BoxInside));
|
||||
UIThemes->SideBarUnselected() : UIThemes->BoxInside()));
|
||||
|
||||
Gui::Draw_Rect(SearchMenu[7].x, SearchMenu[7].y, SearchMenu[7].w, SearchMenu[7].h, (marks & favoriteMarks::DIAMOND ?
|
||||
GFX::Themes[GFX::SelectedTheme].SideBarUnselected : GFX::Themes[GFX::SelectedTheme].BoxInside));
|
||||
UIThemes->SideBarUnselected() : UIThemes->BoxInside()));
|
||||
|
||||
Gui::Draw_Rect(SearchMenu[8].x, SearchMenu[8].y, SearchMenu[8].w, SearchMenu[8].h, (marks & favoriteMarks::CLUBS ?
|
||||
GFX::Themes[GFX::SelectedTheme].SideBarUnselected : GFX::Themes[GFX::SelectedTheme].BoxInside));
|
||||
UIThemes->SideBarUnselected() : UIThemes->BoxInside()));
|
||||
|
||||
Gui::Draw_Rect(SearchMenu[9].x, SearchMenu[9].y, SearchMenu[9].w, SearchMenu[9].h, (marks & favoriteMarks::SPADE ?
|
||||
GFX::Themes[GFX::SelectedTheme].SideBarUnselected : GFX::Themes[GFX::SelectedTheme].BoxInside));
|
||||
UIThemes->SideBarUnselected() : UIThemes->BoxInside()));
|
||||
|
||||
Gui::Draw_Rect(SearchMenu[10].x, SearchMenu[10].y, SearchMenu[10].w, SearchMenu[10].h, (updateFilter ?
|
||||
GFX::Themes[GFX::SelectedTheme].SideBarUnselected : GFX::Themes[GFX::SelectedTheme].BoxInside));
|
||||
UIThemes->SideBarUnselected() : UIThemes->BoxInside()));
|
||||
|
||||
Gui::DrawString(SearchMenu[5].x + 9, SearchMenu[5].y + 7, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, "★", 0, 0, font);
|
||||
Gui::DrawString(SearchMenu[6].x + 9, SearchMenu[6].y + 7, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, "♥", 0, 0, font);
|
||||
Gui::DrawString(SearchMenu[7].x + 9, SearchMenu[7].y + 7, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, "♦", 0, 0, font);
|
||||
Gui::DrawString(SearchMenu[8].x + 9, SearchMenu[8].y + 7, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, "♣", 0, 0, font);
|
||||
Gui::DrawString(SearchMenu[9].x + 9, SearchMenu[9].y + 7, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, "♠", 0, 0, font);
|
||||
Gui::DrawString(SearchMenu[5].x + 9, SearchMenu[5].y + 7, 0.5f, UIThemes->TextColor(), "★", 0, 0, font);
|
||||
Gui::DrawString(SearchMenu[6].x + 9, SearchMenu[6].y + 7, 0.5f, UIThemes->TextColor(), "♥", 0, 0, font);
|
||||
Gui::DrawString(SearchMenu[7].x + 9, SearchMenu[7].y + 7, 0.5f, UIThemes->TextColor(), "♦", 0, 0, font);
|
||||
Gui::DrawString(SearchMenu[8].x + 9, SearchMenu[8].y + 7, 0.5f, UIThemes->TextColor(), "♣", 0, 0, font);
|
||||
Gui::DrawString(SearchMenu[9].x + 9, SearchMenu[9].y + 7, 0.5f, UIThemes->TextColor(), "♠", 0, 0, font);
|
||||
GFX::DrawSprite(sprites_update_filter_idx, SearchMenu[10].x + 8, SearchMenu[10].y + 8);
|
||||
|
||||
Gui::Draw_Rect(SearchMenu[11].x, SearchMenu[11].y, SearchMenu[11].w, SearchMenu[11].h, GFX::Themes[GFX::SelectedTheme].MarkUnselected);
|
||||
Gui::DrawStringCentered(23, SearchMenu[11].y + 6, 0.45f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("SELECTION_QUEUE"), 280, 0, font);
|
||||
Gui::Draw_Rect(SearchMenu[11].x, SearchMenu[11].y, SearchMenu[11].w, SearchMenu[11].h, UIThemes->MarkUnselected());
|
||||
Gui::DrawStringCentered(23, SearchMenu[11].y + 6, 0.45f, UIThemes->TextColor(), Lang::get("SELECTION_QUEUE"), 280, 0, font);
|
||||
|
||||
/* AND / OR. */
|
||||
Gui::Draw_Rect(SearchMenu[12].x, SearchMenu[12].y, SearchMenu[12].w, SearchMenu[12].h, (isAND ? GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
Gui::DrawString(SearchMenu[12].x + 4, SearchMenu[12].y, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, "AND", 0, 0, font);
|
||||
Gui::Draw_Rect(SearchMenu[12].x, SearchMenu[12].y, SearchMenu[12].w, SearchMenu[12].h, (isAND ? UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
Gui::DrawString(SearchMenu[12].x + 4, SearchMenu[12].y, 0.4f, UIThemes->TextColor(), "AND", 0, 0, font);
|
||||
|
||||
Gui::Draw_Rect(SearchMenu[13].x, SearchMenu[13].y, SearchMenu[13].w, SearchMenu[13].h, (!isAND ? GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
Gui::DrawString(SearchMenu[13].x + 8, SearchMenu[13].y, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, "OR", 0, 0, font);
|
||||
Gui::Draw_Rect(SearchMenu[13].x, SearchMenu[13].y, SearchMenu[13].w, SearchMenu[13].h, (!isAND ? UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
Gui::DrawString(SearchMenu[13].x + 8, SearchMenu[13].y, 0.4f, UIThemes->TextColor(), "OR", 0, 0, font);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+44
-49
@@ -78,32 +78,31 @@ static const std::vector<Structs::ButtonPos> dirIcons = {
|
||||
};
|
||||
|
||||
static const Structs::ButtonPos back = { 45, 0, 24, 24 }; // Back arrow for directory.
|
||||
static const Structs::ButtonPos Themes = { 40, 196, 280, 24 }; // Themes.
|
||||
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> dirStrings = { "CHANGE_3DSX_PATH", "3DSX_IN_FOLDER", "CHANGE_NDS_PATH", "CHANGE_ARCHIVE_PATH", "CHANGE_SHORTCUT_PATH", "CHANGE_FIRM_PATH" };
|
||||
extern std::vector<std::string> Themes;
|
||||
|
||||
/* Note: Украïнська is spelled using a latin i with dieresis to work in the system font */
|
||||
static const std::vector<std::string> languages = { "Bruh", "Deutsch", "English", "Español", "Français", "Italiano", /* "Lietuvių", */ "Magyar", /* "Nederlands", */ "Polski", "Português", "Português (Brasil)", "Русский", "Украïнська", /* "עברית", */ "中文 (简体)", "中文 (繁體)", "日本語", /* "한국어" */ };
|
||||
static const std::string langsTemp[] = { "br", "de", "en", "es", "fr", "it", /* "lt", */ "hu", /* "nl", */ "pl", "pt", "pt-BR", "ru", "uk", /* "he", */ "zh-CN", "zh-TW", "jp", /* "ko" */ };
|
||||
static const std::pair<int, int> langSprites[] = { {-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}, /* {-1, 0}, */ {-1, 0}, /* {-1, 0}, */ {-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}, /* {-1, 0}, */ {sprites_zh_CN_idx, 54}, {sprites_zh_TW_idx, 55}, {sprites_jp_idx, 31}, /* {sprites_ko_idx, 30} */ };
|
||||
|
||||
static const std::vector<std::string> ThemeNames = { "THEME_DEFAULT", "Stack" };
|
||||
|
||||
/*
|
||||
Main Settings.
|
||||
|
||||
int selection: The Settings Selection.
|
||||
*/
|
||||
static void DrawSettingsMain(int selection) {
|
||||
Gui::Draw_Rect(40, 0, 280, 25, GFX::Themes[GFX::SelectedTheme].EntryBar);
|
||||
Gui::Draw_Rect(40, 25, 280, 1, GFX::Themes[GFX::SelectedTheme].EntryOutline);
|
||||
Gui::DrawStringCentered(20, 2, 0.6, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("SETTINGS"), 280, 0, font);
|
||||
Gui::Draw_Rect(40, 0, 280, 25, UIThemes->EntryBar());
|
||||
Gui::Draw_Rect(40, 25, 280, 1, UIThemes->EntryOutline());
|
||||
Gui::DrawStringCentered(20, 2, 0.6, UIThemes->TextColor(), Lang::get("SETTINGS"), 280, 0, font);
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
if (i == selection) Gui::Draw_Rect(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, GFX::Themes[GFX::SelectedTheme].MarkSelected);
|
||||
Gui::DrawStringCentered(20, mainButtons[i].y + 4, 0.45f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get(mainStrings[i]), 255, 0, font);
|
||||
if (i == selection) Gui::Draw_Rect(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, UIThemes->MarkSelected());
|
||||
Gui::DrawStringCentered(20, mainButtons[i].y + 4, 0.45f, UIThemes->TextColor(), Lang::get(mainStrings[i]), 255, 0, font);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,18 +113,18 @@ static void DrawSettingsMain(int selection) {
|
||||
int sPos: The Screen Position.
|
||||
*/
|
||||
static void DrawLanguageSettings(int selection, int sPos) {
|
||||
Gui::Draw_Rect(40, 0, 280, 25, GFX::Themes[GFX::SelectedTheme].EntryBar);
|
||||
Gui::Draw_Rect(40, 25, 280, 1, GFX::Themes[GFX::SelectedTheme].EntryOutline);
|
||||
Gui::Draw_Rect(40, 0, 280, 25, UIThemes->EntryBar());
|
||||
Gui::Draw_Rect(40, 25, 280, 1, UIThemes->EntryOutline());
|
||||
GFX::DrawSprite(sprites_arrow_idx, back.x, back.y);
|
||||
GFX::DrawSprite(sprites_add_font_idx, langButtons[6].x, langButtons[6].y);
|
||||
Gui::DrawStringCentered(20, 2, 0.6, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("SELECT_LANG"), 248, 0, font);
|
||||
Gui::DrawStringCentered(20, 2, 0.6, UIThemes->TextColor(), Lang::get("SELECT_LANG"), 248, 0, font);
|
||||
|
||||
for(int i = 0; i < 6 && i < (int)languages.size(); i++) {
|
||||
if (sPos + i == selection) Gui::Draw_Rect(langButtons[i].x, langButtons[i].y, langButtons[i].w, langButtons[i].h, GFX::Themes[GFX::SelectedTheme].MarkSelected);
|
||||
if (sPos + i == selection) Gui::Draw_Rect(langButtons[i].x, langButtons[i].y, langButtons[i].w, langButtons[i].h, UIThemes->MarkSelected());
|
||||
if(langSprites[sPos + i].first != -1)
|
||||
GFX::DrawSprite(langSprites[sPos + i].first, 160 + 20 - (langSprites[sPos + i].second / 2), langButtons[i].y + 6);
|
||||
else
|
||||
Gui::DrawStringCentered(20, langButtons[i].y + 4, 0.45f, GFX::Themes[GFX::SelectedTheme].TextColor, languages[sPos + i], 280, 0, font);
|
||||
Gui::DrawStringCentered(20, langButtons[i].y + 4, 0.45f, UIThemes->TextColor(), languages[sPos + i], 280, 0, font);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,17 +134,17 @@ static void DrawLanguageSettings(int selection, int sPos) {
|
||||
int selection: The Settings Selection.
|
||||
*/
|
||||
static void DrawSettingsDir(int selection) {
|
||||
Gui::Draw_Rect(40, 0, 280, 25, GFX::Themes[GFX::SelectedTheme].EntryBar);
|
||||
Gui::Draw_Rect(40, 25, 280, 1, GFX::Themes[GFX::SelectedTheme].EntryOutline);
|
||||
Gui::Draw_Rect(40, 0, 280, 25, UIThemes->EntryBar());
|
||||
Gui::Draw_Rect(40, 25, 280, 1, UIThemes->EntryOutline());
|
||||
GFX::DrawSprite(sprites_arrow_idx, back.x, back.y);
|
||||
Gui::DrawStringCentered(20, 2, 0.6, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("DIRECTORY_SETTINGS"), 248, 0, font);
|
||||
Gui::DrawStringCentered(20, 2, 0.6, UIThemes->TextColor(), Lang::get("DIRECTORY_SETTINGS"), 248, 0, font);
|
||||
|
||||
for (int i = 0; i < (int)dirButtons.size(); i++) {
|
||||
Gui::Draw_Rect(dirButtons[i].x, dirButtons[i].y, dirButtons[i].w, dirButtons[i].h, (selection == i ? GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
Gui::DrawString(dirButtons[i].x + 4, dirButtons[i].y + 4, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get(dirStrings[i]), 210, 0, font);
|
||||
Gui::Draw_Rect(dirButtons[i].x, dirButtons[i].y, dirButtons[i].w, dirButtons[i].h, (selection == i ? UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
Gui::DrawString(dirButtons[i].x + 4, dirButtons[i].y + 4, 0.5f, UIThemes->TextColor(), Lang::get(dirStrings[i]), 210, 0, font);
|
||||
if(i == 1) { // Put 3DSX in folder has a toggle and description
|
||||
GFX::DrawToggle(dirIcons[i].x, dirIcons[i].y, config->_3dsxInFolder());
|
||||
Gui::DrawString(dirButtons[i].x + 4, dirButtons[i].y + 28, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("3DSX_IN_FOLDER_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
Gui::DrawString(dirButtons[i].x + 4, dirButtons[i].y + 28, 0.4f, UIThemes->TextColor(), Lang::get("3DSX_IN_FOLDER_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
} else {
|
||||
GFX::DrawSprite(sprites_arrow_idx, dirIcons[i].x, dirIcons[i].y, -1.0f);
|
||||
}
|
||||
@@ -156,22 +155,22 @@ static void DrawSettingsDir(int selection) {
|
||||
Draw Auto-Update Settings page.
|
||||
*/
|
||||
static void DrawAutoUpdate(int selection) {
|
||||
Gui::Draw_Rect(40, 0, 280, 25, GFX::Themes[GFX::SelectedTheme].EntryBar);
|
||||
Gui::Draw_Rect(40, 25, 280, 1, GFX::Themes[GFX::SelectedTheme].EntryOutline);
|
||||
Gui::Draw_Rect(40, 0, 280, 25, UIThemes->EntryBar());
|
||||
Gui::Draw_Rect(40, 25, 280, 1, UIThemes->EntryOutline());
|
||||
GFX::DrawSprite(sprites_arrow_idx, back.x, back.y);
|
||||
|
||||
Gui::DrawStringCentered(20, 2, 0.6, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("AUTO_UPDATE_SETTINGS"), 240, 0, font);
|
||||
Gui::DrawStringCentered(20, 2, 0.6, UIThemes->TextColor(), Lang::get("AUTO_UPDATE_SETTINGS"), 240, 0, font);
|
||||
|
||||
/* Toggle Boxes. */
|
||||
Gui::Draw_Rect(40, 44, 280, 24, (selection == 0 ? GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
Gui::DrawString(47, 48, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("AUTO_UPDATE_UNISTORE"), 210, 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("AUTO_UPDATE_UNISTORE"), 210, 0, font);
|
||||
GFX::DrawToggle(toggleAbles[0].x, toggleAbles[0].y, config->autoupdate());
|
||||
Gui::DrawString(47, 75, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("AUTO_UPDATE_UNISTORE_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
Gui::DrawString(47, 75, 0.4f, UIThemes->TextColor(), Lang::get("AUTO_UPDATE_UNISTORE_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
|
||||
Gui::Draw_Rect(40, 120, 280, 24, (selection == 1 ? GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
Gui::DrawString(47, 124, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("AUTO_UPDATE_UU"), 210, 0, font);
|
||||
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);
|
||||
GFX::DrawToggle(toggleAbles[1].x, toggleAbles[1].y, config->updatecheck());
|
||||
Gui::DrawString(47, 151, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("AUTO_UPDATE_UU_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
Gui::DrawString(47, 151, 0.4f, UIThemes->TextColor(), Lang::get("AUTO_UPDATE_UU_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -180,24 +179,26 @@ static void DrawAutoUpdate(int selection) {
|
||||
int selection: The Settings Selection.
|
||||
*/
|
||||
static void DrawGUISettings(int selection) {
|
||||
Gui::Draw_Rect(40, 0, 280, 25, GFX::Themes[GFX::SelectedTheme].EntryBar);
|
||||
Gui::Draw_Rect(40, 25, 280, 1, GFX::Themes[GFX::SelectedTheme].EntryOutline);
|
||||
Gui::Draw_Rect(40, 0, 280, 25, UIThemes->EntryBar());
|
||||
Gui::Draw_Rect(40, 25, 280, 1, UIThemes->EntryOutline());
|
||||
GFX::DrawSprite(sprites_arrow_idx, back.x, back.y);
|
||||
|
||||
Gui::DrawStringCentered(20, 2, 0.6, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("GUI_SETTINGS"), 248, 0, font);
|
||||
Gui::DrawStringCentered(20, 2, 0.6, UIThemes->TextColor(), Lang::get("GUI_SETTINGS"), 248, 0, font);
|
||||
|
||||
Gui::Draw_Rect(40, 44, 280, 24, (selection == 0 ? GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
Gui::DrawString(47, 48, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("UNISTORE_BG"), 210, 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);
|
||||
GFX::DrawToggle(toggleAbles[0].x, toggleAbles[0].y, config->usebg());
|
||||
Gui::DrawString(47, 75, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("UNISTORE_BG_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
Gui::DrawString(47, 75, 0.4f, UIThemes->TextColor(), Lang::get("UNISTORE_BG_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
|
||||
Gui::Draw_Rect(40, 120, 280, 24, (selection == 1 ? GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
Gui::DrawString(47, 124, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("CUSTOM_FONT"), 210, 0, font);
|
||||
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);
|
||||
GFX::DrawToggle(toggleAbles[1].x, toggleAbles[1].y, config->customfont());
|
||||
Gui::DrawString(47, 151, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("CUSTOM_FONT_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
Gui::DrawString(47, 151, 0.4f, UIThemes->TextColor(), Lang::get("CUSTOM_FONT_DESC"), 265, 0, font, C2D_WordWrap);
|
||||
|
||||
Gui::Draw_Rect(40, 196, 280, 24, (selection == 2 ? GFX::Themes[GFX::SelectedTheme].MarkSelected : GFX::Themes[GFX::SelectedTheme].MarkUnselected));
|
||||
Gui::DrawString(47, 200, 0.5f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("ACTIVE_THEME") + ": " + (GFX::SelectedTheme == 0 ? Lang::get(ThemeNames[GFX::SelectedTheme]) : ThemeNames[GFX::SelectedTheme]), 210, 0, font);
|
||||
if (!Themes.empty()) {
|
||||
Gui::Draw_Rect(40, 196, 280, 24, (selection == 2 ? UIThemes->MarkSelected() : UIThemes->MarkUnselected()));
|
||||
Gui::DrawString(47, 200, 0.5f, UIThemes->TextColor(), Lang::get("ACTIVE_THEME") + ": " + config->theme(), 270, 0, font);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -489,7 +490,7 @@ static void GUISettingsLogic(int &page, int &selection) {
|
||||
}
|
||||
|
||||
if (hRepeat & KEY_DOWN) {
|
||||
if (selection < 2) selection++;
|
||||
if (selection < (Themes.empty() ? 1 : 2)) selection++;
|
||||
}
|
||||
|
||||
if (hRepeat & KEY_UP) {
|
||||
@@ -509,11 +510,8 @@ static void GUISettingsLogic(int &page, int &selection) {
|
||||
|
||||
(config->customfont() ? Init::LoadFont() : Init::UnloadFont());
|
||||
|
||||
} else if (touching(touch, Themes)) {
|
||||
if (GFX::SelectedTheme < (_THEME_AMOUNT - 1)) GFX::SelectedTheme++;
|
||||
else GFX::SelectedTheme = 0;
|
||||
|
||||
config->theme(GFX::SelectedTheme);
|
||||
} else if (touching(touch, Theme)) {
|
||||
if (!Themes.empty()) Overlays::SelectTheme();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -530,10 +528,7 @@ static void GUISettingsLogic(int &page, int &selection) {
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (GFX::SelectedTheme < (_THEME_AMOUNT - 1)) GFX::SelectedTheme++;
|
||||
else GFX::SelectedTheme = 0;
|
||||
|
||||
config->theme(GFX::SelectedTheme);
|
||||
if (!Themes.empty()) Overlays::SelectTheme();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,10 +47,10 @@ static const std::vector<Structs::ButtonPos> sidePos = {
|
||||
void StoreUtils::DrawSideMenu(int currentMenu) {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
if (i == currentMenu) {
|
||||
Gui::Draw_Rect(sidePos[i].x, sidePos[i].y, sidePos[i].w, sidePos[i].h, GFX::Themes[GFX::SelectedTheme].SideBarSelected);
|
||||
Gui::Draw_Rect(sidePos[i].x, sidePos[i].y, sidePos[i].w, sidePos[i].h, UIThemes->SideBarSelected());
|
||||
|
||||
} else {
|
||||
Gui::Draw_Rect(sidePos[i].x, sidePos[i].y, sidePos[i].w, sidePos[i].h, GFX::Themes[GFX::SelectedTheme].SideBarUnselected);
|
||||
Gui::Draw_Rect(sidePos[i].x, sidePos[i].y, sidePos[i].w, sidePos[i].h, UIThemes->SideBarUnselected());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ void StoreUtils::DrawSideMenu(int currentMenu) {
|
||||
GFX::DrawIcon(sprites_sort_idx, sidePos[4].x, sidePos[4].y);
|
||||
GFX::DrawIcon(sprites_settings_idx, sidePos[5].x, sidePos[5].y);
|
||||
|
||||
Gui::Draw_Rect(40, 0, 1, 240, GFX::Themes[GFX::SelectedTheme].BarOutline);
|
||||
Gui::Draw_Rect(40, 0, 1, 240, UIThemes->BarOutline());
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+13
-13
@@ -74,33 +74,33 @@ static const uint8_t GetType(SortType st) {
|
||||
SortType st: The SortType variable.
|
||||
*/
|
||||
void StoreUtils::DrawSorting(bool asc, SortType st) {
|
||||
Gui::Draw_Rect(40, 0, 280, 25, GFX::Themes[GFX::SelectedTheme].EntryBar);
|
||||
Gui::Draw_Rect(40, 25, 280, 1, GFX::Themes[GFX::SelectedTheme].EntryOutline);
|
||||
Gui::DrawStringCentered(17, 2, 0.6, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("SORTING"), 273, 0, font);
|
||||
Gui::Draw_Rect(40, 0, 280, 25, UIThemes->EntryBar());
|
||||
Gui::Draw_Rect(40, 25, 280, 1, UIThemes->EntryOutline());
|
||||
Gui::DrawStringCentered(17, 2, 0.6, UIThemes->TextColor(), Lang::get("SORTING"), 273, 0, font);
|
||||
|
||||
/* Sort By. */
|
||||
Gui::DrawString(buttons[0].x + 1, buttons[0].y - 20, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("SORT_BY"), 90, 0, font);
|
||||
Gui::DrawString(buttons[0].x + 1, buttons[0].y - 20, 0.6f, UIThemes->TextColor(), Lang::get("SORT_BY"), 90, 0, font);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
DrawCheck(i, i == GetType(st));
|
||||
}
|
||||
|
||||
Gui::DrawString(buttons[0].x + 21, buttons[0].y + 2, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("TITLE"), 80, 0, font);
|
||||
Gui::DrawString(buttons[1].x + 21, buttons[1].y + 2, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("AUTHOR"), 80, 0, font);
|
||||
Gui::DrawString(buttons[2].x + 21, buttons[2].y + 2, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("LAST_UPDATED"), 80, 0, font);
|
||||
Gui::DrawString(buttons[0].x + 21, buttons[0].y + 2, 0.4f, UIThemes->TextColor(), Lang::get("TITLE"), 80, 0, font);
|
||||
Gui::DrawString(buttons[1].x + 21, buttons[1].y + 2, 0.4f, UIThemes->TextColor(), Lang::get("AUTHOR"), 80, 0, font);
|
||||
Gui::DrawString(buttons[2].x + 21, buttons[2].y + 2, 0.4f, UIThemes->TextColor(), Lang::get("LAST_UPDATED"), 80, 0, font);
|
||||
|
||||
/* Direction. */
|
||||
Gui::DrawString(buttons[3].x + 1, buttons[3].y - 20, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("DIRECTION"), 80, 0, font);
|
||||
Gui::DrawString(buttons[3].x + 1, buttons[3].y - 20, 0.6f, UIThemes->TextColor(), Lang::get("DIRECTION"), 80, 0, font);
|
||||
DrawCheck(3, asc);
|
||||
DrawCheck(4, !asc);
|
||||
Gui::DrawString(buttons[3].x + 21, buttons[3].y + 2, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("ASCENDING"), 80, 0, font);
|
||||
Gui::DrawString(buttons[4].x + 21, buttons[4].y + 2, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("DESCENDING"), 80, 0, font);
|
||||
Gui::DrawString(buttons[3].x + 21, buttons[3].y + 2, 0.4f, UIThemes->TextColor(), Lang::get("ASCENDING"), 80, 0, font);
|
||||
Gui::DrawString(buttons[4].x + 21, buttons[4].y + 2, 0.4f, UIThemes->TextColor(), Lang::get("DESCENDING"), 80, 0, font);
|
||||
|
||||
/* Top Style. */
|
||||
Gui::DrawString(buttons[5].x + 1, buttons[5].y - 20, 0.6f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("TOP_STYLE"), 90, 0, font);
|
||||
Gui::DrawString(buttons[5].x + 1, buttons[5].y - 20, 0.6f, UIThemes->TextColor(), Lang::get("TOP_STYLE"), 90, 0, font);
|
||||
DrawCheck(5, config->list());
|
||||
DrawCheck(6, !config->list());
|
||||
Gui::DrawString(buttons[5].x + 21, buttons[5].y + 2, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("LIST"), 90, 0, font);
|
||||
Gui::DrawString(buttons[6].x + 21, buttons[6].y + 2, 0.4f, GFX::Themes[GFX::SelectedTheme].TextColor, Lang::get("GRID"), 90, 0, font);
|
||||
Gui::DrawString(buttons[5].x + 21, buttons[5].y + 2, 0.4f, UIThemes->TextColor(), Lang::get("LIST"), 90, 0, font);
|
||||
Gui::DrawString(buttons[6].x + 21, buttons[6].y + 2, 0.4f, UIThemes->TextColor(), Lang::get("GRID"), 90, 0, font);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user