def setMessage(self, row, message, color = Colors.WHITE, start = 0, cutoff = -1): #TODO: ability to right-justify if cutoff is -1: cutoff = self.cols shapes = Shapes.stringToShapes(message) col = start while col < cutoff and len(shapes) > 0: self.set(row, col, shapes.pop(0), color) col += 1
def __init__(self, text, color=Colors.WHITE, height=1, width=None): super().__init__() self.charString = Shapes.stringToShapes(text) self.direction="left" self.height = height self.color = color if width is None: self.width = len(self.charString) else: self.width = width