def change_text(self, text): self.art = "" rows_content = text_parser._parse_str(text) row = 0 while row < len(rows_content): self.art = self.art + self.gen_ascii_art(rows_content[row]) row = row + 1
def set_text(self, text, regen=True): self._text = text if regen: self._parsed_text = text_parser._parse_str(text, width=(self._width - 2 * self._frame_width)) self._art = self._gen_framed_text()