added a label for the loop input mode

This commit is contained in:
SallarShayegan
2025-04-08 18:41:46 +02:00
parent 8f9e5257f6
commit b5b792b449

18
main.py
View File

@ -67,6 +67,9 @@ class GuiMain:
False
)
self.loop_input_mode = None
self.set_loop_input_mode(0)
self.athmos = Athmos(self.screen)
self.athmos.show_list = False
@ -97,6 +100,14 @@ class GuiMain:
def set_athmo_filenames(self, filenames):
self.athmos.set_filenames(filenames)
def set_loop_input_mode(self, mode):
str_mode = 'SJ'
if mode == 0:
str_mode = 'S'
elif mode == 1:
str_mode = 'J'
self.loop_input_mode = font_helvetica16.render(str_mode, False, color_primary)
def update(self):
if self.running:
# fill the screen with a color to wipe away anything from last frame
@ -123,7 +134,12 @@ class GuiMain:
self.lloop_button.display()
self.rloop_button.display()
self.rec_button.display()
if self.loop_input_mode is not None:
self.screen.blit(self.loop_input_mode,
(self.lloop_button.position[1]+self.rloop_button.position[1]/2),
(self.fx_mode_buttons[3].x + self.lloop_button.position[0]/2))
pygame.draw.polygon(self.screen, "white", [(0, self.screenH/2), (self.screenW*3 / 19, self.screenH), (0, self.screenH)])
# flip() the display to put your work on screen
pygame.display.flip()