Woops, fixes and defines. :P

This commit is contained in:
StackZ
2020-11-07 10:52:08 +01:00
parent ee2769b294
commit 0dc8369bff
6 changed files with 32 additions and 12 deletions
+9 -5
View File
@@ -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);
}
}
}
}