Use a fake pad to make tests runnable

This commit is contained in:
Yohann D'ANELLO
2020-11-08 23:40:03 +01:00
parent 65d89b7f9f
commit 3486c865a1
5 changed files with 27 additions and 5 deletions

View File

@ -18,12 +18,12 @@ class MenuDisplay(Display):
self.toplefty = toplefty
# Menu values are printed in pad
self.pad = curses.newpad(self.trueheight, self.truewidth + 1)
self.pad = self.newpad(self.trueheight, self.truewidth + 1)
for i in range(self.trueheight):
self.pad.addstr(i, 0, " " + self.values[i].value)
# Menu box
self.menubox = curses.newpad(self.height, self.width)
self.menubox = self.newpad(self.height, self.width)
self.menubox.addstr(0, 0, "" + "" * (self.width - 2) + "")
for i in range(1, self.height - 2):
self.menubox.addstr(i, 0, "" + " " * (self.width - 2) + "")