bugfix: athmo should not blit at all, when showlist is false

This commit is contained in:
SallarShayegan
2025-04-05 16:05:47 +02:00
parent 2bb807aca9
commit bfd5b41e93
2 changed files with 5 additions and 4 deletions

View File

@ -24,8 +24,8 @@ class Athmos:
return min(MAX_COUNT, len(self.filenames)) return min(MAX_COUNT, len(self.filenames))
def update(self): def update(self):
self.surface.fill("black")
if self.show_list: if self.show_list:
self.surface.fill("black")
for i in range(self.get_display_count()): for i in range(self.get_display_count()):
text = self.filenames[(i-self.index-math.floor(self.get_display_count()/2))%len(self.filenames)] 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): if i == math.floor(self.get_display_count()/2):
@ -38,5 +38,5 @@ class Athmos:
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.surface.blit(text_surface, ((0, self.surface.get_height()/self.get_display_count()*i)))
self.screen.blit(self.surface, (self.screen.get_width()/3, self.screen.blit(self.surface, (self.screen.get_width()/3,
(self.screen.get_height() - self.surface.get_height())/2)) (self.screen.get_height() - self.surface.get_height())/2))

View File

@ -47,7 +47,7 @@ class GuiMain:
for i in range(len(self.fx_mode_labels)): for i in range(len(self.fx_mode_labels)):
self.knobs.append(Knobs(self)) self.knobs.append(Knobs(self))
#self.set_fx_mode(self.fx_mode) self.set_fx_mode(self.fx_mode)
self.mute_button = BinaryButton( self.mute_button = BinaryButton(
self.screen, self.screen,
@ -67,6 +67,7 @@ class GuiMain:
) )
self.athmos = Athmos(self.screen) self.athmos = Athmos(self.screen)
self.athmos.show_list = False
self.clock = pygame.time.Clock() self.clock = pygame.time.Clock()
self.running = True self.running = True