Exemplo n.º 1
0
    def del_msg(self, msg):
        color_b = colors.get_color(INIT_BG_COLOR)
        color_c = colors.get_color(INIT_FM_COLOR)

        for i, ch in enumerate(msg):
            char_id = self.char_table.get_code(u'█')
            self.poke(0+i, -2, char_id, color_c, color_b)
Exemplo n.º 2
0
    def __init__(self, queue_to_view, queue_from_view):
        self.map = ScreenMap()
        self.char_table = CharTable()
        self.printmap = PrintMap(self.clear_screen)
        self.fm_color = colors.get_color(INIT_FM_COLOR)
        self.bg_color = colors.get_color(INIT_BG_COLOR)
        self.ch_color = colors.get_color(INIT_CH_COLOR)
        self.last_comm_time = time()

        self.comm_to_view = CommToView(queue_to_view, queue_from_view)
        self.key = PressedKey(self._receive_from_view)
        self._reset_canvas()
        self.printf(INIT_MSG)
Exemplo n.º 3
0
 def set_fm_color(self, color):
     if color is None:
         return
     color_c = colors.get_color(color)
     self.fm_color = color_c
     self._reset_canvas()
     self._write_all_chars()
Exemplo n.º 4
0
    def poke(self, x, y, code, color = None, reverse=False):
        if color:
            color_c = colors.get_color(color)
            self.ch_color = color_c

        if isinstance(code, int):
            char_id = self.char_table.get_code(code)
            self.set_char_in_screen(char_id, x, y, reverse)
        else:
            char_id = 31
            self.set_char_in_screen(char_id, x, y)
Exemplo n.º 5
0
 def set_color(self, color):
     if color is not None:
         color_c = colors.get_color(color)
         self.ch_color = color_c