Clear menu pads before putting the new text in them, see #15
This commit is contained in:
parent
8a85f58261
commit
62599ea72c
|
@ -34,6 +34,7 @@ class MenuDisplay(Display):
|
||||||
if self.height - 2 >= self.trueheight - self.menu.position else 0
|
if self.height - 2 >= self.trueheight - self.menu.position else 0
|
||||||
|
|
||||||
# Menu box
|
# Menu box
|
||||||
|
self.menubox.clear()
|
||||||
self.menubox.addstr(0, 0, "┏" + "━" * (self.width - 2) + "┓")
|
self.menubox.addstr(0, 0, "┏" + "━" * (self.width - 2) + "┓")
|
||||||
for i in range(1, self.height - 1):
|
for i in range(1, self.height - 1):
|
||||||
self.menubox.addstr(i, 0, "┃" + " " * (self.width - 2) + "┃")
|
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.menubox.refresh(0, 0, self.y, self.x,
|
||||||
self.height + self.y,
|
self.height + self.y,
|
||||||
self.width + self.x)
|
self.width + self.x)
|
||||||
|
self.pad.clear()
|
||||||
self.update_pad()
|
self.update_pad()
|
||||||
self.pad.refresh(cornery, 0, self.y + 1, self.x + 2,
|
self.pad.refresh(cornery, 0, self.y + 1, self.x + 2,
|
||||||
self.height - 2 + self.y,
|
self.height - 2 + self.y,
|
||||||
|
|
Loading…
Reference in New Issue