Erase pads instead of clearing them, fixes #21
This commit is contained in:
parent
3e7dabc94e
commit
1e48bd16b3
|
@ -15,7 +15,7 @@ class LogsDisplay(Display):
|
|||
print(type(self.logs.messages), flush=True)
|
||||
messages = self.logs.messages[-self.height:]
|
||||
messages = messages[::-1]
|
||||
self.pad.clear()
|
||||
self.pad.erase()
|
||||
for i in range(min(self.height, len(messages))):
|
||||
self.addstr(self.pad, self.height - i - 1, self.x,
|
||||
messages[i][:self.width])
|
||||
|
|
|
@ -42,7 +42,7 @@ class MapDisplay(Display):
|
|||
pminrow = max(0, min(self.map.height, pminrow))
|
||||
pmincol = max(0, min(self.pack.tile_width * self.map.width, pmincol))
|
||||
|
||||
self.pad.clear()
|
||||
self.pad.erase()
|
||||
self.update_pad()
|
||||
self.refresh_pad(self.pad, pminrow, pmincol, sminrow, smincol, smaxrow,
|
||||
smaxcol)
|
||||
|
|
|
@ -35,7 +35,7 @@ class MenuDisplay(Display):
|
|||
|
||||
# Menu box
|
||||
self.menubox.refresh(self.y, self.x, self.height, self.width)
|
||||
self.pad.clear()
|
||||
self.pad.erase()
|
||||
self.update_pad()
|
||||
self.refresh_pad(self.pad, cornery, 0, self.y + 1, self.x + 2,
|
||||
self.height - 2 + self.y,
|
||||
|
|
|
@ -38,7 +38,7 @@ class StatsDisplay(Display):
|
|||
| self.color_pair(3))
|
||||
|
||||
def display(self) -> None:
|
||||
self.pad.clear()
|
||||
self.pad.erase()
|
||||
self.update_pad()
|
||||
self.refresh_pad(self.pad, 0, 0, self.y, self.x,
|
||||
self.y + self.height - 1, self.width + self.x - 1)
|
||||
|
|
|
@ -55,7 +55,7 @@ class Game:
|
|||
when the given key gets pressed.
|
||||
"""
|
||||
while True: # pragma no cover
|
||||
screen.clear()
|
||||
screen.erase()
|
||||
screen.refresh()
|
||||
self.display_actions(DisplayActions.REFRESH)
|
||||
key = screen.getkey()
|
||||
|
|
Loading…
Reference in New Issue