diff options
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) |
