]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - music_sampler.py
Cleanup some constants
[perso/Immae/Projets/Python/MusicSampler.git] / music_sampler.py
index 8ebfaa3e664f9c57eb951e57682dffd4e565eb74..c17f7bff98d1764704ee542ef9a1004aa1151f8b 100644 (file)
@@ -47,7 +47,7 @@ while 1:
     if context == 'normal':
         if event.type == pygame.KEYDOWN:
             key = mapping.find_by_key_num(event.key)
-            if key is not None:
+            if key is not None and not key.disabled:
                 threading.Thread(name = "MSKeyAction", target=key.do_actions).start()
                 threading.Thread(name = "MSClic", target=key.list_actions, args = [screen]).start()
         elif event.type == pygame.MOUSEBUTTONUP:
@@ -65,10 +65,10 @@ while 1:
     for music_file in open_files.values():
         police.set_bold(False)
         if music_file.is_playing():
-            icon = icon_police.render("⏵", True, (0,0,0))
             if music_file.is_paused():
                 icon = icon_police.render("⏸", True, (0,0,0))
             else:
+                icon = icon_police.render("⏵", True, (0,0,0))
                 police.set_bold(True)
             text = police.render(music_file.name, True, (0,0,0))
             surface.blit(icon, (0, offset))