home · contact · privacy
More TUI client refactoring.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 7 Jun 2021 00:08:42 +0000 (02:08 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 7 Jun 2021 00:08:42 +0000 (02:08 +0200)
plomrogue_client/tui.py
rogue_chat_curses.py

index 3ed1b62772d0e635db5574a7e2f804f0f26b1c51..758d7f76b036926770acd07c68e71814c6340181 100644 (file)
@@ -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:
index 888d9ff4aa27fd4ad2c557116f2bda66eb40dba1..91418f61f6820fa0e1ad5e89503dc8114c177322 100755 (executable)
@@ -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: