Commit a22d5bc9 authored by santiago duque's avatar santiago duque

added second button and logic to stop events as a test

parent ee3a2319
...@@ -67,10 +67,12 @@ def play_sound(index): ...@@ -67,10 +67,12 @@ def play_sound(index):
while channel.get_busy(): while channel.get_busy():
pygame.time.wait(100) # ms pygame.time.wait(100) # ms
print("Playing...") print("Playing...")
print(btn_array[current_sound_index].is_held)
print(btn_array[current_sound_index].is_pressed)
pygame.event.clear() pygame.event.clear()
sound_playing = False sound_playing = False
btn_array[current_sound_index].when_pressed = lambda: btn_pressed(index) #btn_array[current_sound_index].when_pressed = lambda: btn_pressed(index)
print("Finished. ") print("Finished. ")
""" todo """ todo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment