From: Armaan Bhojwani Date: Sat, 13 Feb 2021 18:33:13 +0000 (-0500) Subject: Clear message in menu better X-Git-Tag: v0.7.0~29 X-Git-Url: https://git.armaanb.net/?p=lightcards.git;a=commitdiff_plain;h=ea55d7a18ee925988e2d71b92cfb4b2f3bfcfedc Clear message in menu better --- diff --git a/lightcards/display.py b/lightcards/display.py index 8e19d3c..f93b0fa 100644 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -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)