From 2ab53c8116410b42e7099160bfd693fa910da811 Mon Sep 17 00:00:00 2001 From: KikooDX Date: Wed, 6 Nov 2019 10:57:50 +0100 Subject: [PATCH] The cursor is now always to the bottom right with fancy display. --- locate2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/locate2.py b/locate2.py index 3088b60..e763c72 100644 --- a/locate2.py +++ b/locate2.py @@ -71,6 +71,7 @@ class Screen: class Pad(Screen): def refresh(self, x=1, y=1, width=21, height=7, ask_for_input=True,\ endl="\n", fancy=True): + ogwidth = width if width > self._width: width = self._width if height > self._height: @@ -94,7 +95,7 @@ class Pad(Screen): to_print = to_print[:-1] print(to_print[:-width], end="") if ask_for_input or fancy: - return input(to_print[-width:-1] if fancy else "> ") + return input(to_print[-width:-1]+ " " * (ogwidth - width) if fancy else "> ") else: print(to_print[-width:], end=endl) return None