summaryrefslogtreecommitdiff
path: root/asciifarm/client/display/fieldpad.py
diff options
context:
space:
mode:
authortroido <troido@hotmail.com>2017-10-27 22:18:51 +0200
committertroido <troido@hotmail.com>2017-10-27 22:18:51 +0200
commit687bc04dd7988b2b9a34e91397f948c6fa44aad9 (patch)
tree4d1c05c36cb480bc1a45ddc7508e2b38a4368b56 /asciifarm/client/display/fieldpad.py
parentb821aa6cc7e4bd137eb57a0ccebb5b514eb0031b (diff)
merged master changes from today into package branch
Diffstat (limited to 'asciifarm/client/display/fieldpad.py')
-rw-r--r--asciifarm/client/display/fieldpad.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/asciifarm/client/display/fieldpad.py b/asciifarm/client/display/fieldpad.py
index 461cb57..8d177d5 100644
--- a/asciifarm/client/display/fieldpad.py
+++ b/asciifarm/client/display/fieldpad.py
@@ -17,11 +17,11 @@ class FieldPad:
def resize(self, width, height):
self.size = (width, height)
- self.pad.resize(height+1, width*self.charSize1)
+ self.pad.resize(height+1, width*self.charSize+1)
- def changeCell(self, x, y, char, colour=None):
+ def changeCell(self, x, y, char, colour=None, bgcolour=0):
if colour != None and self.colours:
- self.pad.addstr(y, x*self.charSize, char, curses.color_pair(colour))
+ self.pad.addstr(y, x*self.charSize, char, self.colours.get(colour, bgcolour))
else:
self.pad.addstr(y, x*self.charSize, char)
self.changed = True