diff options
| author | troido <troido@hotmail.com> | 2017-11-13 14:29:54 +0100 |
|---|---|---|
| committer | troido <troido@hotmail.com> | 2017-11-13 14:29:54 +0100 |
| commit | 3fcc264ff36bc5f942d0d24af231c06e6025ae85 (patch) | |
| tree | f21787e387f215658b10acf25ca9472f9cfd9538 /asciifarm/client/display/infopad.py | |
| parent | a29876590bf97c9cf0b1e8a8760481a435a3a46c (diff) | |
cleanup of display stuff
Diffstat (limited to 'asciifarm/client/display/infopad.py')
| -rw-r--r-- | asciifarm/client/display/infopad.py | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/asciifarm/client/display/infopad.py b/asciifarm/client/display/infopad.py index 7c9fef0..c98b7cd 100644 --- a/asciifarm/client/display/infopad.py +++ b/asciifarm/client/display/infopad.py @@ -7,33 +7,21 @@ class InfoPad: - def __init__(self, size=(1,1), *args): - #self.pad = curses.newpad(size[1], size[0]) - #self.size = size + def __init__(self): self.changed = False self.lines = [] - #self.lastView = None def showString(self, string): self.lines = string.split('\n') - #self.pad.clear() - #self.pad.addstr(0,0,string) self.changed = True - def update(self, win, force=False): + def update(self, win, force): if not self.changed and not force or not win: return - #self.lastView = (x, y, xmax, ymax) height, width = win.getmaxyx() - lines = [line[:width] for line in self.lines][:height] + lines = [line[:width-1] for line in self.lines][:height] text = '\n'.join(lines) win.erase() win.addstr(0, 0, text) self.changed = False win.noutrefresh() - #0, - #0, - #y, - #x, - #ymax-1, - #xmax-1) |
