SUPERNOVA: Scrolls inventory when taking an object
Signed-off-by: Joseph-Eugene Winzer <joewinzer@googlemail.com>
This commit is contained in:
parent
9f3f9f47ad
commit
3814f33826
1 changed files with 4 additions and 0 deletions
|
@ -817,6 +817,10 @@ void GameManager::takeObject(Object &obj) {
|
|||
obj.setProperty(CARRIED);
|
||||
obj._click = obj._click2 = 255;
|
||||
_inventory.add(obj);
|
||||
if (_inventory.getSize() > _inventoryScroll + 8) {
|
||||
_inventoryScroll = _inventory.getSize() - 8;
|
||||
_inventoryScroll += _inventoryScroll % 2;
|
||||
}
|
||||
}
|
||||
|
||||
void GameManager::drawCommandBox() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue