diff --git a/README.md b/README.md
index cc45b2a..8ceb715 100644
--- a/README.md
+++ b/README.md
@@ -37,3 +37,7 @@ To build Universal-Updater from source, you need devkitPro installed, along with
## Contributions
[PabloMK7](https://github.com/mariohackandglitch): For improving the Download code.
+
+## Icon Credits
+
+Trash icon icon by Icons8
\ No newline at end of file
diff --git a/assets/gfx/sprites.t3s b/assets/gfx/sprites.t3s
index 66e901f..da17745 100644
--- a/assets/gfx/sprites.t3s
+++ b/assets/gfx/sprites.t3s
@@ -3,6 +3,7 @@
sprites/arrow.png
sprites/bottom_screen_bot.png
sprites/bottom_screen_top.png
+sprites/delete.png
sprites/download_all.png
sprites/top_screen_bot.png
sprites/top_screen_top.png
diff --git a/assets/gfx/sprites/delete.png b/assets/gfx/sprites/delete.png
new file mode 100644
index 0000000..ad92fd9
Binary files /dev/null and b/assets/gfx/sprites/delete.png differ
diff --git a/include/screens/scriptlist.hpp b/include/screens/scriptlist.hpp
index 3275baf..753a35c 100644
--- a/include/screens/scriptlist.hpp
+++ b/include/screens/scriptlist.hpp
@@ -93,7 +93,7 @@ private:
{295, 215, 25, 25}, // Arrow Down.
{0, 215, 25, 25}, // Back Arrow.
{5, 0, 25, 25}, // viewMode Change
- {45, 0, 25, 25}, // Search.
+ {45, 0, 25, 25}, // Delete.
};
std::vector subPos = {
{10, 70, 140, 40}, // Script list.
diff --git a/include/screens/unistore.hpp b/include/screens/unistore.hpp
index 409547b..bcc9ab7 100644
--- a/include/screens/unistore.hpp
+++ b/include/screens/unistore.hpp
@@ -100,7 +100,7 @@ private:
{295, 215, 25, 25}, // Arrow Down.
{0, 215, 25, 25}, // Back Arrow.
{5, 0, 25, 25}, // ViewMode Change.
- {45, 0, 25, 25}, // Search.
+ {45, 0, 25, 25}, // Delete.
{85, 0, 25, 25}, // Update.
};
std::vector URLBtn = {
diff --git a/romfs/lang/en/app.json b/romfs/lang/en/app.json
index ace257e..2a23ae7 100644
--- a/romfs/lang/en/app.json
+++ b/romfs/lang/en/app.json
@@ -148,5 +148,7 @@
"NOT_FOUND_COLOR": "Not Found Script Color",
"OUTDATED_COLOR": "Outdated Script Color",
"UPTODATE_COLOR": "Up-To-Date Script Color",
- "FUTURE_COLOR": "Future Script Color"
+ "FUTURE_COLOR": "Future Script Color",
+ "DELETE_SCRIPT2": "Delete the selected Script.",
+ "DELETE_UNISTORE": "Delete the selected UniStore."
}
diff --git a/source/screens/scriptlist.cpp b/source/screens/scriptlist.cpp
index bc101c5..836fbf9 100644
--- a/source/screens/scriptlist.cpp
+++ b/source/screens/scriptlist.cpp
@@ -244,6 +244,7 @@ void ScriptList::DrawList(void) const {
GFX::DrawArrow(315, 240, 180.0);
GFX::DrawArrow(0, 218, 0, 1);
GFX::DrawSpriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
+ GFX::DrawSpriteBlend(sprites_delete_idx, arrowPos[4].x, arrowPos[4].y);
if (Config::viewMode == 0) {
for(int i=0;i 40+(i*57) && touch.py < 40+(i*57)+45) {
if (fileInfo2.size() != 0) {
choice = fileInfo2[screenPos + i];
- runFunctions(jsonFile);
+ if (Msg::promptMsg(Lang::get("EXECUTE_SCRIPT") + "\n\n" + choice)) {
+ runFunctions(jsonFile);
+ }
}
}
}
@@ -766,6 +769,10 @@ void ScriptList::DrawGlossary(void) const {
Gui::DrawString(50, 102, 0.6f, Config::TxtColor, Lang::get("ENTRY_DOWN"), 260);
GFX::DrawArrow(20, 130, 0, 1);
Gui::DrawString(50, 132, 0.6f, Config::TxtColor, Lang::get("GO_BACK"), 260);
+ if (lastMode == 1) {
+ GFX::DrawSpriteBlend(sprites_delete_idx, 20, 160);
+ Gui::DrawString(50, 162, 0.6f, Config::TxtColor, Lang::get("DELETE_SCRIPT2"), 260);
+ }
GFX::DrawArrow(0, 218, 0, 1);
}
diff --git a/source/screens/unistore.cpp b/source/screens/unistore.cpp
index 06b75c8..b32a9e2 100644
--- a/source/screens/unistore.cpp
+++ b/source/screens/unistore.cpp
@@ -280,7 +280,7 @@ void UniStore::DrawStoreList(void) const {
GFX::DrawArrow(315, 240, 180.0);
GFX::DrawArrow(0, 218, 0, 1);
GFX::DrawSpriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
- GFX::DrawSpriteBlend(sprites_search_idx, arrowPos[4].x, arrowPos[4].y);
+ GFX::DrawSpriteBlend(sprites_delete_idx, arrowPos[4].x, arrowPos[4].y);
GFX::DrawSpriteBlend(sprites_update_idx, arrowPos[5].x, arrowPos[5].y);
if (Config::viewMode == 0) {
@@ -686,7 +686,7 @@ void UniStore::StoreSelectionLogic(u32 hDown, u32 hHeld, touchPosition touch) {
}
}
- if (hDown & KEY_SELECT) {
+ if ((hDown & KEY_SELECT) || (hDown & KEY_TOUCH && touching(touch, arrowPos[4]))) {
if (Msg::promptMsg(Lang::get("DELETE_STORE"))) {
deleteStore(Selection);
}
@@ -1097,6 +1097,8 @@ void UniStore::DrawGlossary(void) const {
if (lastMode == 1) {
GFX::DrawSpriteBlend(sprites_update_idx, 20, 160);
Gui::DrawString(50, 162, 0.6f, Config::TxtColor, Lang::get("UPDATE_STORE"), 260);
+ GFX::DrawSpriteBlend(sprites_delete_idx, 20, 190);
+ Gui::DrawString(50, 192, 0.6f, Config::TxtColor, Lang::get("DELETE_UNISTORE"), 260);
}
}