See desc for more.

- Add `skip` function.
- Fix dirSelect.
- Move LangSelect to settings.
- Add bars, to keep the U-U style.
This commit is contained in:
StackZ 2020-11-03 02:41:38 +01:00
commit b6d1de03c1
9 changed files with 256 additions and 242 deletions

View file

@ -32,9 +32,6 @@
#include <functional>
#include <unistd.h>
extern bool touching(touchPosition touch, Structs::ButtonPos button);
extern touchPosition touch;
bool nameEndsWith(const std::string &name, const std::vector<std::string> &extensionList) {
if (name.substr(0, 2) == "._") return false;

View file

@ -494,6 +494,17 @@ Result ScriptUtils::runFunctions(const nlohmann::json &storeJson, const int &sel
if (!missing) ret = ScriptUtils::renameFile(oldFile, newFile, Message);
else ret = SYNTAX_ERROR;
} else if (type == "skip") {
int skipCount = -1;
if (storeJson["storeContent"][selection][entry][i].contains("count") && storeJson["storeContent"][selection][entry][i]["count"].is_number()) {
skipCount = storeJson["storeContent"][selection][entry][i]["count"];
}
if (skipCount > 0) {
i += skipCount; // Skip.
}
}
}
}