Deleted artifact debug line. Implemented fancy for Pad. Need testing on the calc.

This commit is contained in:
KikooDX 2019-11-06 10:06:11 +01:00
parent 8ac28a47f4
commit f1f664f716
1 changed files with 6 additions and 6 deletions

View File

@ -69,7 +69,8 @@ class Screen:
get_cell_content = get_cell # For retro-compability
class Pad(Screen):
def refresh(self, x=1, y=1, width=21, height=6, ask_for_input=True, endl="\n"):
def refresh(self, x=1, y=1, width=21, height=7, ask_for_input=True,\
endl="\n", fancy=True):
if width > self._width:
width = self._width
if height > self._height:
@ -88,13 +89,12 @@ class Pad(Screen):
for dy in range(y, height+y):
dy = dy
for dx in range(x, width+x):
print(dx, dy)
to_print += self._mat[dy][dx]
to_print += "\n"
to_print = to_print[:-1]
print(to_print)
if ask_for_input:
return input("> ")
print(to_print[:-width], end="")
if ask_for_input or fancy:
return input(to_print[-21:-1] if fancy else "> ")
else:
print("", end=endl)
print(to_print[-21:], end=endl)
return None