bugfix: athmo should not blit at all, when showlist is false
This commit is contained in:
@ -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))
|
||||||
3
main.py
3
main.py
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user