Enable text scrolling (banner-style) on media title

This commit is contained in:
2024-05-17 00:48:41 +01:00
parent 1a96ed6ed5
commit a0e524a8b1
2 changed files with 28 additions and 10 deletions

8
app.py
View File

@@ -17,6 +17,7 @@ class App:
else: self.scr_n = 0
self.lcd = LCD()
self.last_cng = 0
self.must_draw = False
def __connect(self) -> int:
wlan = WLAN(STA_IF)
@@ -161,14 +162,17 @@ class App:
self.s = MediaScreen(SCREENS[self.scr_n]["name"], SCREENS[self.scr_n]["entity"])
else:
self.s = UnknownScreen("Unknown")
self.s.display(self.lcd)
self.must_draw = self.s.display(self.lcd)
# otherwise minimise the number of pixels being changed
else:
b = self.handleButtons()
if (b):
self.last_cng = time()
continue
self.s.update(self.lcd)
if (self.must_draw):
self.s.display(self.lcd)
else:
self.s.update(self.lcd)
else:
if (self.handleButtons(False)):
LCD.setDuty()