From bdc7c2b1bcc0126414bb8b31d748307cd5fb5303 Mon Sep 17 00:00:00 2001 From: strdst Date: Tue, 3 Jun 2025 22:14:28 +0200 Subject: [PATCH] make the time animation look nice :3 --- buba/animations/time.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/buba/animations/time.py b/buba/animations/time.py index 5affeef..c1b70c2 100644 --- a/buba/animations/time.py +++ b/buba/animations/time.py @@ -10,12 +10,9 @@ class BubaTime(BubaAnimation): super().__init__(buba) def run(self): - self.buba.simple_text(page=0, row=0, col=91, text="Bus-Bahn-Anzeige") - self.buba.simple_text(page=0, row=1, col=0, text="Chaos Computer Club") - self.buba.simple_text(page=0, row=2, col=0, text="Hansestadt Hamburg") - self.buba.simple_text(page=0, row=3, col=0, text="Hello, world!") - self.buba.set_page(0) + self.buba.text(page=0, row=0, col_start=0, col_end=120, text="Chaos Computer Club", align=BubaCmd.ALIGN_CENTER) + self.buba.text(page=0, row=1, col_start=0, col_end=120, text="Hansestadt Hamburg", align=BubaCmd.ALIGN_CENTER) - for i in range(3): - self.buba.text(page=0, row=0, col_start=93, col_end=119, text=datetime.now().strftime("%H:%M:"), align=BubaCmd.ALIGN_RIGHT) - sleep(2) + self.buba.text(page=0, row=3, col_start=0, col_end=120, text=datetime.now().strftime("%Y-%m-%d %H:%M"), align=BubaCmd.ALIGN_CENTER) + + sleep(10)