mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-06 00:38:59 +00:00
Woops, fixes and defines. :P
This commit is contained in:
@@ -103,11 +103,13 @@ void StoreUtils::GridLogic(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
if (store) { // Ensure, store is not a nullptr.
|
||||
if (hRepeat & KEY_DOWN) {
|
||||
if (store->GetBox() > 9) {
|
||||
if (store->GetEntry() + 5 < (int)entries.size()) {
|
||||
if (store->GetEntry() + 5 < (int)entries.size() - 1) {
|
||||
store->SetEntry(store->GetEntry() + 5);
|
||||
|
||||
if (store->GetScreenIndx() < (((int)entries.size() / 5) - 2)) {
|
||||
store->SetScreenIndx(store->GetScreenIndx() + 1);
|
||||
if (entries.size() > 15) {
|
||||
if (store->GetScreenIndx() < (((int)entries.size() / 5) - 2)) {
|
||||
store->SetScreenIndx(store->GetScreenIndx() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -115,8 +117,10 @@ void StoreUtils::GridLogic(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
store->SetEntry(entries.size() - 1);
|
||||
store->SetBox(10 + (store->GetEntry() % 5));
|
||||
|
||||
if (store->GetScreenIndx() < (((int)entries.size() / 5) - 2)) {
|
||||
store->SetScreenIndx(store->GetScreenIndx() + 1);
|
||||
if (entries.size() > 15) {
|
||||
if (store->GetScreenIndx() < (((int)entries.size() / 5) - 2)) {
|
||||
store->SetScreenIndx(store->GetScreenIndx() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +103,7 @@ void StoreUtils::ListLogic(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
|
||||
if (hRepeat & KEY_LEFT) {
|
||||
if (store->GetEntry() - 2 > 0) store->SetEntry(store->GetEntry() - 3);
|
||||
else store->SetEntry(0);
|
||||
}
|
||||
|
||||
if (hRepeat & KEY_UP) {
|
||||
|
||||
@@ -219,9 +219,9 @@ void Store::LoadFromFile(const std::string &file) {
|
||||
/* Check, if valid. */
|
||||
if (this->storeJson.contains("storeInfo") && this->storeJson.contains("storeContent")) {
|
||||
if (this->storeJson["storeInfo"].contains("version") && this->storeJson["storeInfo"]["version"].is_number()) {
|
||||
if (this->storeJson["storeInfo"]["version"] < 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_OLD"));
|
||||
else if (this->storeJson["storeInfo"]["version"] > 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_NEW"));
|
||||
this->valid = this->storeJson["storeInfo"]["version"] == 3;
|
||||
if (this->storeJson["storeInfo"]["version"] < _UNISTORE_VERSION) Msg::waitMsg(Lang::get("UNISTORE_TOO_OLD"));
|
||||
else if (this->storeJson["storeInfo"]["version"] > _UNISTORE_VERSION) Msg::waitMsg(Lang::get("UNISTORE_TOO_NEW"));
|
||||
this->valid = this->storeJson["storeInfo"]["version"] == _UNISTORE_VERSION;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user