From: Christian Heller Date: Mon, 7 Jun 2021 00:08:42 +0000 (+0200) Subject: More TUI client refactoring. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/process?a=commitdiff_plain;h=9690851ac5b6c0c994a59a3de405e147e883345b;p=plomrogue2 More TUI client refactoring. --- diff --git a/plomrogue_client/tui.py b/plomrogue_client/tui.py index 3ed1b62..758d7f7 100644 --- a/plomrogue_client/tui.py +++ b/plomrogue_client/tui.py @@ -42,9 +42,6 @@ class TUI: self.stdscr.timeout(10) self.reset_size() - def draw_screen(self): - self.stdscr.clear() - def get_key_and_keycode(self): try: key = self.stdscr.getkey() @@ -70,6 +67,7 @@ class TUI: for msg in self.socket.get_message(): self.handle_server_message(msg) if self.do_refresh: + self.stdscr.clear() self.draw_screen() self.do_refresh = False try: diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index 888d9ff..91418f6 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -1073,7 +1073,6 @@ class RogueChatTUI(TUI): lines[i]) def draw_screen(self): - super().draw_screen() self.stdscr.bkgd(' ', curses.color_pair(1)) self.recalc_input_lines() if self.mode.has_input_prompt: