Inventory arrows scroll the inventory correctly now
svn-id: r28719
This commit is contained in:
parent
1e8ebaa7bd
commit
41ee693710
1 changed files with 7 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue