diff options
| author | troido <troido@hotmail.com> | 2018-01-01 20:09:23 +0100 |
|---|---|---|
| committer | troido <troido@hotmail.com> | 2018-01-01 20:09:23 +0100 |
| commit | 6e38056beff444b54dab65f8f8e3830cbcb05e88 (patch) | |
| tree | b670ba6b95419d94c8b28267e416f7bf06c53072 /asciifarm/client/display/screen.py | |
| parent | 123edfd17cd9aa38d6d5e511a8c686d5d71ab140 (diff) | |
inventory, equipment and ground object lists now scroll with the selector
Diffstat (limited to 'asciifarm/client/display/screen.py')
| -rw-r--r-- | asciifarm/client/display/screen.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/asciifarm/client/display/screen.py b/asciifarm/client/display/screen.py index a09c2a9..b563c00 100644 --- a/asciifarm/client/display/screen.py +++ b/asciifarm/client/display/screen.py @@ -1,12 +1,12 @@ import curses from .fieldpad import FieldPad +from asciifarm.common.utils import clamp import signal class Screen: - def __init__(self, display, stdscr): self.display = display curses.curs_set(0) @@ -22,16 +22,16 @@ class Screen: sideW = 20 sideX = width-sideW - msgH = max(3, min(height // 5, 5)) + msgH = clamp(height // 5, 3, 5) msgY = height - msgH-1 inputH = 1 inputY = msgY + msgH healthY = 0 healthH = self._limitHeight(2, healthY) groundY = healthY + healthH - groundH = self._limitHeight(7, groundY) + groundH = self._limitHeight(6, groundY) invY = groundY + groundH - invH = self._limitHeight(12, invY) + invH = self._limitHeight(9, invY) eqY = invY + invH eqH = self._limitHeight(5, eqY) infoY = eqY + eqH |
