diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-06-21 00:08:27 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-06-21 00:08:27 +0200 |
commit | fba0caf0417cbb4e5b370e16e4b0c855c74094c1 (patch) | |
tree | 685005b11cee601592575adfdc2b40a72f403a33 /music_sampler.py | |
parent | 5c327cc405f11575446915627d1bbf0c14323b67 (diff) | |
download | MusicSampler-fba0caf0417cbb4e5b370e16e4b0c855c74094c1.tar.gz MusicSampler-fba0caf0417cbb4e5b370e16e4b0c855c74094c1.tar.zst MusicSampler-fba0caf0417cbb4e5b370e16e4b0c855c74094c1.zip |
Cleanup some constants
Diffstat (limited to 'music_sampler.py')
-rw-r--r-- | music_sampler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/music_sampler.py b/music_sampler.py index 8ebfaa3..c17f7bf 100644 --- a/music_sampler.py +++ b/music_sampler.py | |||
@@ -47,7 +47,7 @@ while 1: | |||
47 | if context == 'normal': | 47 | if context == 'normal': |
48 | if event.type == pygame.KEYDOWN: | 48 | if event.type == pygame.KEYDOWN: |
49 | key = mapping.find_by_key_num(event.key) | 49 | key = mapping.find_by_key_num(event.key) |
50 | if key is not None: | 50 | if key is not None and not key.disabled: |
51 | threading.Thread(name = "MSKeyAction", target=key.do_actions).start() | 51 | threading.Thread(name = "MSKeyAction", target=key.do_actions).start() |
52 | threading.Thread(name = "MSClic", target=key.list_actions, args = [screen]).start() | 52 | threading.Thread(name = "MSClic", target=key.list_actions, args = [screen]).start() |
53 | elif event.type == pygame.MOUSEBUTTONUP: | 53 | elif event.type == pygame.MOUSEBUTTONUP: |
@@ -65,10 +65,10 @@ while 1: | |||
65 | for music_file in open_files.values(): | 65 | for music_file in open_files.values(): |
66 | police.set_bold(False) | 66 | police.set_bold(False) |
67 | if music_file.is_playing(): | 67 | if music_file.is_playing(): |
68 | icon = icon_police.render("⏵", True, (0,0,0)) | ||
69 | if music_file.is_paused(): | 68 | if music_file.is_paused(): |
70 | icon = icon_police.render("⏸", True, (0,0,0)) | 69 | icon = icon_police.render("⏸", True, (0,0,0)) |
71 | else: | 70 | else: |
71 | icon = icon_police.render("⏵", True, (0,0,0)) | ||
72 | police.set_bold(True) | 72 | police.set_bold(True) |
73 | text = police.render(music_file.name, True, (0,0,0)) | 73 | text = police.render(music_file.name, True, (0,0,0)) |
74 | surface.blit(icon, (0, offset)) | 74 | surface.blit(icon, (0, offset)) |