From 62599ea72c5f5fdeaa085186b64ec7c9eb2c3605 Mon Sep 17 00:00:00 2001 From: Nicolas Margulies Date: Fri, 20 Nov 2020 16:05:21 +0100 Subject: [PATCH] Clear menu pads before putting the new text in them, see #15 --- squirrelbattle/display/menudisplay.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/squirrelbattle/display/menudisplay.py b/squirrelbattle/display/menudisplay.py index fca1ddf..082772b 100644 --- a/squirrelbattle/display/menudisplay.py +++ b/squirrelbattle/display/menudisplay.py @@ -34,6 +34,7 @@ class MenuDisplay(Display): if self.height - 2 >= self.trueheight - self.menu.position else 0 # Menu box + self.menubox.clear() self.menubox.addstr(0, 0, "┏" + "━" * (self.width - 2) + "┓") for i in range(1, self.height - 1): self.menubox.addstr(i, 0, "┃" + " " * (self.width - 2) + "┃") @@ -43,6 +44,7 @@ class MenuDisplay(Display): self.menubox.refresh(0, 0, self.y, self.x, self.height + self.y, self.width + self.x) + self.pad.clear() self.update_pad() self.pad.refresh(cornery, 0, self.y + 1, self.x + 2, self.height - 2 + self.y,