13 lines
358 B
Python
13 lines
358 B
Python
|
import color
|
||
|
from point import Point
|
||
|
|
||
|
class RenderString(object):
|
||
|
def __init__(self, s, x=0, attrs=None):
|
||
|
if attrs is None:
|
||
|
attrs = color.build('default', 'default')
|
||
|
self.string = s
|
||
|
self.x = x
|
||
|
self.attrs = attrs
|
||
|
def draw(self, cwin, y, x):
|
||
|
cwin.addstr(y, self.x + x, self.string, self.attrs)
|