From ea55d7a18ee925988e2d71b92cfb4b2f3bfcfedc Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Sat, 13 Feb 2021 13:33:13 -0500 Subject: [PATCH] Clear message in menu better --- lightcards/display.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) -- 2.39.2