summaryrefslogtreecommitdiff
path: root/asciifarm/client/display/window.py
diff options
context:
space:
mode:
Diffstat (limited to 'asciifarm/client/display/window.py')
-rw-r--r--asciifarm/client/display/window.py40
1 files changed, 0 insertions, 40 deletions
diff --git a/asciifarm/client/display/window.py b/asciifarm/client/display/window.py
deleted file mode 100644
index bae7797..0000000
--- a/asciifarm/client/display/window.py
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-class Window:
- """ Small wrapper around curses windows """
-
- def __init__(self, win, colours=False):
-
- self.setWin(win)
- self.colours = colours
-
-
-
- def setWin(self, win):
- self.win = win
-
- def getSize(self):
- if not self.win:
- return (0, 0)
- height, width = self.win.getmaxyx()
- return (width, height)
-
- def getPos(self):
- if not self.win:
- return (0, 0)
- y, x = win.getparyx()
- return (x, y)
-
- def addString(self, pos, string, colour=(0,0)):
- x, y = pos
- if self.colours:
- self.win.addstr(y, x, string, self.colours.get(colour))
- else:
- self.win.addstr(y, x, string)
-
- def erase(self):
- self.win.erase()
-
-
-