diff options
| author | troido <troido@hotmail.com> | 2017-11-06 21:12:10 +0100 |
|---|---|---|
| committer | troido <troido@hotmail.com> | 2017-11-06 21:12:10 +0100 |
| commit | 07250230943a5fdfd7961063478523ee948710f4 (patch) | |
| tree | ebec70993152b583485fad9687ccf3d89349bd40 /asciifarm/client/display/inventorypad.py | |
| parent | 47b57891ef4940a6fa2047345e092ba2f00cd1ba (diff) | |
changed ui places for inventory and ground. fixed bug where small screens would crash game
Diffstat (limited to 'asciifarm/client/display/inventorypad.py')
| -rw-r--r-- | asciifarm/client/display/inventorypad.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/asciifarm/client/display/inventorypad.py b/asciifarm/client/display/inventorypad.py index 0b3bdf9..e81f9de 100644 --- a/asciifarm/client/display/inventorypad.py +++ b/asciifarm/client/display/inventorypad.py @@ -20,10 +20,10 @@ class InventoryPad: self.changed = True def getHeight(self): - return len(self.items)+2 + return self.maxItems+2 def update(self, screen, x, y, xmax, ymax): - if not self.changed and (x, y, xmax, ymax) == self.lastView: + if not self.changed and (x, y, xmax, ymax) == self.lastView or xmax <= x or ymax <= y: return self.lastView = (x, y, xmax, ymax) self.changed = False |
