From 9690851ac5b6c0c994a59a3de405e147e883345b Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 7 Jun 2021 02:08:42 +0200 Subject: [PATCH] More TUI client refactoring. --- plomrogue_client/tui.py | 4 +--- rogue_chat_curses.py | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) 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: -- 2.30.2