mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Fix grid scrolling.
This commit is contained in:
+5
-19
@@ -106,22 +106,14 @@ void StoreUtils::GridLogic(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
|||||||
if (store->GetEntry() + 5 < (int)entries.size() - 1) {
|
if (store->GetEntry() + 5 < (int)entries.size() - 1) {
|
||||||
store->SetEntry(store->GetEntry() + 5);
|
store->SetEntry(store->GetEntry() + 5);
|
||||||
|
|
||||||
if (entries.size() > 15) {
|
if (entries.size() > 15) store->SetScreenIndx((store->GetEntry() / 5) - 2);
|
||||||
if (store->GetScreenIndx() < (((int)entries.size() / 5) - 2)) {
|
|
||||||
store->SetScreenIndx(store->GetScreenIndx() + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (store->GetEntry() < (int)entries.size() - 1) {
|
if (store->GetEntry() < (int)entries.size() - 1) {
|
||||||
store->SetEntry(entries.size() - 1);
|
store->SetEntry(entries.size() - 1);
|
||||||
store->SetBox(10 + (store->GetEntry() % 5));
|
store->SetBox(10 + (store->GetEntry() % 5));
|
||||||
|
|
||||||
if (entries.size() > 15) {
|
if (entries.size() > 15) store->SetScreenIndx((store->GetEntry() / 5) - 2);
|
||||||
if (store->GetScreenIndx() < (((int)entries.size() / 5) - 2)) {
|
|
||||||
store->SetScreenIndx(store->GetScreenIndx() + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,9 +135,7 @@ void StoreUtils::GridLogic(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
|||||||
store->SetBox(10);
|
store->SetBox(10);
|
||||||
store->SetEntry(store->GetEntry() + 1);
|
store->SetEntry(store->GetEntry() + 1);
|
||||||
|
|
||||||
if (store->GetScreenIndx() < (((int)entries.size() / 5) - 2)) {
|
store->SetScreenIndx((store->GetEntry() / 5) - 2);
|
||||||
store->SetScreenIndx(store->GetScreenIndx() + 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -160,9 +150,7 @@ void StoreUtils::GridLogic(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
|||||||
store->SetBox(4);
|
store->SetBox(4);
|
||||||
store->SetEntry(store->GetEntry() - 1);
|
store->SetEntry(store->GetEntry() - 1);
|
||||||
|
|
||||||
if (store->GetScreenIndx() > 0) {
|
store->SetScreenIndx((store->GetEntry() / 5));
|
||||||
store->SetScreenIndx(store->GetScreenIndx() - 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -172,9 +160,7 @@ void StoreUtils::GridLogic(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
|||||||
if (store->GetEntry() > 4) {
|
if (store->GetEntry() > 4) {
|
||||||
store->SetEntry(store->GetEntry() - 5);
|
store->SetEntry(store->GetEntry() - 5);
|
||||||
|
|
||||||
if (store->GetScreenIndx() > 0) {
|
store->SetScreenIndx((store->GetEntry() / 5));
|
||||||
store->SetScreenIndx(store->GetScreenIndx() - 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
int dlIndex: The Download index.
|
int dlIndex: The Download index.
|
||||||
*/
|
*/
|
||||||
ArgumentParser::ArgumentParser(const std::string &file, const std::string &entry, int dlIndex) {
|
ArgumentParser::ArgumentParser(const std::string &file, const std::string &entry, int dlIndex) {
|
||||||
if (dlIndex != -1 || file != "") {
|
if (dlIndex != -1 && file != "") {
|
||||||
this->file = file;
|
this->file = file;
|
||||||
this->entry = entry;
|
this->entry = entry;
|
||||||
this->dlIndex = dlIndex;
|
this->dlIndex = dlIndex;
|
||||||
|
|||||||
Reference in New Issue
Block a user