from graphics.colors import Colors from graphics.writer import Layer class Menu: def __init__(self, cli, buttons): self.cli = cli #self.stats = stats self.buttons = buttons self.current = 0 def draw_layer(self): layer = Layer(self.cli, 1) x = 1 for button in self.buttons: color = (Colors.WHITEBG, Colors.BLACK) if self.buttons[self.current] == button: color = (Colors.REDBG, Colors.BLACK) layer.put_string(button, x, self.cli.y-10, color) x += 11 return layer