athmos display been bugfixed and can now be switched by the knobs display

This commit is contained in:
SallarShayegan
2025-04-08 16:03:58 +02:00
parent bfd5b41e93
commit 8f9e5257f6
3 changed files with 19 additions and 11 deletions

View File

@ -27,15 +27,17 @@ class Athmos:
if self.show_list:
self.surface.fill("black")
for i in range(self.get_display_count()):
text = self.filenames[(i-self.index-math.floor(self.get_display_count()/2))%len(self.filenames)]
if i == math.floor(self.get_display_count()/2):
# text = self.filenames[(i-self.index-math.floor(self.get_display_count()/2))%len(self.filenames)]
text = self.filenames[i]
# if i == math.floor(self.get_display_count()/2):
if i == self.index:
text_surface = font_helvetica16.render(text, False, "black", color_primary_light)
else:
text_surface = font_helvetica16.render(text, False, color_primary_light)
opacity = math.floor((i+1) * 2 * 255 / MAX_COUNT
if i < MAX_COUNT/2
else (MAX_COUNT-i) * 2 * 255 / MAX_COUNT)
text_surface.set_alpha(opacity)
# text_surface.set_alpha(opacity)
self.surface.blit(text_surface, ((0, self.surface.get_height()/self.get_display_count()*i)))
self.screen.blit(self.surface, (self.screen.get_width()/3,