mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Show Red/Green Rectangles in 20x20, to see the current state.
This commit is contained in:
@@ -40,5 +40,9 @@
|
||||
"INSTALLED_REV": "Installed revision: ",
|
||||
"CURRENT_REV": "Current revision: ",
|
||||
"AUTHOR": "author: ",
|
||||
"TITLE": "title: "
|
||||
"TITLE": "title: ",
|
||||
|
||||
"FUTURE_SCRIPT": "This Script is a Future Script.",
|
||||
"OUTDATED_SCRIPT": "This Script is outdated.",
|
||||
"UP-TO-DATE": "This Script is Up-To-Date."
|
||||
}
|
||||
|
||||
@@ -114,6 +114,13 @@ void ScriptBrowse::Draw(void) const {
|
||||
Gui::DrawStringCentered(0, 100, 0.7f, Config::TxtColor, Lang::get("AUTHOR") + std::string(infoJson[selection]["author"]), 400);
|
||||
Gui::DrawStringCentered(0, 120, 0.7f, Config::TxtColor, Lang::get("INSTALLED_REV") + std::to_string(int64_t(infoJson[selection]["curRevision"])), 400);
|
||||
Gui::DrawStringCentered(0, 140, 0.7f, Config::TxtColor, Lang::get("CURRENT_REV")+ std::to_string(int64_t(infoJson[selection]["revision"])), 400);
|
||||
if(infoJson[selection]["curRevision"] < infoJson[selection]["revision"]) {
|
||||
Gui::DrawStringCentered(0, 160, 0.7f, Config::TxtColor, Lang::get("OUTDATED_SCRIPT"), 400);
|
||||
} else if(infoJson[selection]["curRevision"] == infoJson[selection]["revision"]) {
|
||||
Gui::DrawStringCentered(0, 160, 0.7f, Config::TxtColor, Lang::get("UP-TO-DATE"), 400);
|
||||
} else if(infoJson[selection]["curRevision"] > infoJson[selection]["revision"]) {
|
||||
Gui::DrawStringCentered(0, 160, 0.7f, Config::TxtColor, Lang::get("FUTURE_SCRIPT"), 400);
|
||||
}
|
||||
Gui::DrawBottom();
|
||||
for(int i=0;i<ENTRIES_PER_SCREEN && i<(int)infoJson.size();i++) {
|
||||
if(screenPos + i == selection) {
|
||||
@@ -121,6 +128,12 @@ void ScriptBrowse::Draw(void) const {
|
||||
} else {
|
||||
Gui::Draw_Rect(0, 40+(i*57), 320, 45, Config::UnselectedColor);
|
||||
}
|
||||
|
||||
if(infoJson[screenPos+i]["curRevision"] < infoJson[selection]["revision"]) {
|
||||
Gui::Draw_Rect(300, 45+(i*59), 20, 20, C2D_Color32(0xfb, 0x5b, 0x5b, 255));
|
||||
} else if(infoJson[screenPos+i]["curRevision"] == infoJson[selection]["revision"]) {
|
||||
Gui::Draw_Rect(300, 45+(i*59), 20, 20, C2D_Color32(0xa5, 0xdd, 0x81, 255));
|
||||
}
|
||||
Gui::DrawStringCentered(0, 38+(i*57), 0.7f, Config::TxtColor, infoJson[screenPos+i]["title"], 320);
|
||||
Gui::DrawStringCentered(0, 62+(i*57), 0.7f, Config::TxtColor, infoJson[screenPos+i]["author"], 320);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user