summaryrefslogtreecommitdiffstats
path: root/cholerab/cholerab-live/view.py
diff options
context:
space:
mode:
Diffstat (limited to 'cholerab/cholerab-live/view.py')
-rw-r--r--cholerab/cholerab-live/view.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/cholerab/cholerab-live/view.py b/cholerab/cholerab-live/view.py
index 3d5cd873..29608a7d 100644
--- a/cholerab/cholerab-live/view.py
+++ b/cholerab/cholerab-live/view.py
@@ -12,7 +12,7 @@ class CursesView(threading.Thread):
adds a char at the current cursor position
abstraction to the curses win.addch()
"""
- try: self.win.addch(char)
+ try: self.win.addch(char,2)
except: pass
self.cholerab.send_char(self.x,self.y,chr(char))
def stop(self):
@@ -49,7 +49,11 @@ class CursesView(threading.Thread):
log.info('backspace pressed')
self.x -=1;
self.x,self.y = try_move(self.x,self.y)
- self.win.addch(' ')
+ self.addch(ord(' '))
+ elif c == ord('\n'):
+ log.info('enter pressed')
+ self.y +=1;
+ self.x,self.y = try_move(self.x,self.y)
else :
self.addch(c)
self.x +=1
@@ -58,7 +62,7 @@ class CursesView(threading.Thread):
def write_char(self,x,y,char,user=1):
user = user % 3 + 1
- self.win.addch(y,x,char)
+ self.win.addch(y,x,char,color_pair(user))
self.win.move(self.y,self.x)
self.refresh()
def write_str(self,x,y,string,user=1):