]> git.armaanb.net Git - lightcards.git/commitdiff
Clear message in menu better
authorArmaan Bhojwani <me@armaanb.net>
Sat, 13 Feb 2021 18:33:13 +0000 (13:33 -0500)
committerArmaan Bhojwani <me@armaanb.net>
Sat, 13 Feb 2021 18:35:25 +0000 (13:35 -0500)
lightcards/display.py

index 8e19d3c49f57fd9c7ed69dd5ab21ff39475de03f..f93b0fa58921f1aa881e97a11d6d2db1d24cf737 100644 (file)
@@ -151,6 +151,10 @@ class Menu:
 
         self.win.box()
 
+    def clear_msg(self):
+        for i in range(42):
+            self.win.addch(15, i + 1, " ")
+
     def menu_print(self, string, err=False):
         """Print messages on the menu screen"""
         if err:
@@ -220,8 +224,7 @@ class Menu:
         Display a menu offering multiple options on how to manipulate the deck
         and to continue
         """
-        for i in range(42):
-            self.win.addch(14, i + 1, " ")
+        self.clear_msg()
 
         (mlines, mcols) = self.outer.win.getmaxyx()
         self.win.mvwin(int(mlines / 2) - 8, int(mcols / 2) - 22)