From 3a8afeb369d4ef66c9b991e64febe66a35338177 Mon Sep 17 00:00:00 2001 From: Wango Fett Date: Thu, 26 Oct 2017 17:05:49 +0000 Subject: Pip installable! --- asciifarm/client/display/infopad.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 asciifarm/client/display/infopad.py (limited to 'asciifarm/client/display/infopad.py') diff --git a/asciifarm/client/display/infopad.py b/asciifarm/client/display/infopad.py new file mode 100644 index 0000000..6fd8655 --- /dev/null +++ b/asciifarm/client/display/infopad.py @@ -0,0 +1,25 @@ + +import curses + + + +class InfoPad: + + + + def __init__(self, size=(1,1), *args): + self.pad = curses.newpad(size[1], size[0]) + self.size = size + + def showString(self, string): + self.pad.clear() + self.pad.addstr(0,0,string) + + def update(self, screen, x, y, xmax, ymax): + self.pad.noutrefresh( + 0, + 0, + y, + x, + ymax-1, + xmax-1) -- cgit