aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2007-08-25 12:38:35 +0000
committerFilippos Karapetis2007-08-25 12:38:35 +0000
commit41ee6937108801b5212e3eba67fd2f199107246a (patch)
treef0aa86f921a0d6543c3bacbdff0a7a4683da5868
parent1e8ebaa7bda5becdb9c89604a6abacf7be69dfb0 (diff)
downloadscummvm-rg350-41ee6937108801b5212e3eba67fd2f199107246a.tar.gz
scummvm-rg350-41ee6937108801b5212e3eba67fd2f199107246a.tar.bz2
scummvm-rg350-41ee6937108801b5212e3eba67fd2f199107246a.zip
Inventory arrows scroll the inventory correctly now
svn-id: r28719
-rw-r--r--engines/saga/interface.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 96740930cc..307ab8ad04 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -1931,11 +1931,14 @@ void Interface::handleMainUpdate(const Point& mousePoint) {
//inventory stuff
void Interface::inventoryChangePos(int chg) {
- if ((chg < 0 && _inventoryStart + chg >= 0) ||
- (chg > 0 && _inventoryStart < _inventoryEnd)) {
- _inventoryStart += chg;
- draw();
+ // Arrows will scroll the inventory up or down up to 4 items
+ for (int i = 1; i <= 4; i++) {
+ if ((chg < 0 && _inventoryStart + chg >= 0) ||
+ (chg > 0 && _inventoryStart < _inventoryEnd)) {
+ _inventoryStart += chg;
}
+ }
+ draw();
}
void Interface::inventorySetPos(int key) {