key_properties:
'a':
description:
- - Chloé
+ - # Chloé
- Jonglacro
- color: [255, 0, 0]
+ color: [73, 221, 226]
'z':
description:
- - Chloé
- - Jonglacro 2
- color: [255, 0, 0]
+ - #Chloé
+ - Jonglacro
+ - 2
+ color: [73, 221, 226]
'e':
description:
- - Chloé
- - Stop jonglacro 2
- color: [255, 0, 0]
+ - #Chloé
+ - Fin
+ - jonglacro
+ color: [73, 221, 226]
'r':
description:
- - Chloé
- - Lancer prisonnière
- color: [255, 0, 0]
+ - #Chloé
+ - Lancer
+ - prisonnière
+ color: [73, 221, 226]
't':
description:
- - Chloé
- - Stop lancer prisonnière
- color: [255, 0, 0]
+ - #Chloé
+ - Fin
+ - lancer
+ color: [73, 221, 226]
'y':
description:
- - Chloé
+ - #Chloé
- Quête
- color: [255, 0, 0]
+ color: [73, 221, 226]
'u':
description:
- - Chloé
- - Grrr
- color: [255, 0, 0]
+ - #Chloé
+ - Monstre
+ color: [73, 221, 226]
'i':
description:
- - Chloé
- - Transition -> entrée ondine
- color: [255, 0, 0]
+ - #Chloé
+ - Fin quête
+ - Entrée ondine
+ color: [73, 221, 226]
'o':
description:
- - Denise
+ - #Denise
+ - Fin ondine
- Cour ondine
- color: [0, 255, 0]
+ color: [190, 110, 236]
'p':
description:
- - Denise
- - Stop cour ondine
- color: [0, 255, 0]
+ - #Denise
+ - Fin
+ - cour ondine
+ color: [190, 110, 236]
'q':
description:
- - Chloé
- - Fouille jonglage
- color: [255, 0, 0]
+ - #Chloé
+ - Fouille
+ - Jonglage
+ color: [73, 221, 226]
's':
description:
- - Denise
- - Stop fouille jonglage
- color: [0, 255, 0]
+ - #Denise
+ - Fin
+ - Jonglage
+ color: [190, 110, 236]
'd':
description:
- - Denise
- - Libération prisonnière
- color: [0, 255, 0]
+ - #Denise
+ - Libération
+ - Prisonnière
+ color: [190, 110, 236]
'f':
description:
- - Denise
- - Paf + baisser musique
- color: [0, 255, 0]
+ - #Denise
+ - Paf
+ - Baisser musique
+ color: [190, 110, 236]
'g':
description:
- - Denise
- - Stop musique
- color: [0, 255, 0]
+ - #Denise
+ - Stop
+ - libération
+ color: [190, 110, 236]
'h':
description:
- - Denise
- - Duos
- color: [0, 255, 0]
+ - #Denise
+ - Duo
+ color: [190, 110, 236]
'j':
description:
- - Jérôme
- - Transition trios
- color: [0, 0, 255]
+ - #Jérôme
+ - Fin duo
+ - Trio
+ color: [240, 158, 0]
'k':
description:
- - Jérôme
- - Stop trios
- color: [0, 0, 255]
+ - #Jérôme
+ - Fin trio
+ color: [240, 158, 0]
'l':
description:
- - Jérôme
- - Jeu à 2-4
- color: [0, 0, 255]
+ - #Jérôme
+ - Jeu à
+ - 2 4
+ color: [240, 158, 0]
'm':
description:
- - Chloé
+ - #Chloé
+ - Fin jeu
- Début baston
- color: [255, 0, 0]
+ color: [73, 221, 226]
'w':
description:
- - Christophe
- - Transition ralenti
+ - #Christophe
+ - Fin baston
+ - Ralenti
color: [255, 255, 0]
'x':
description:
- - Christophe
- - Stop ralenti
+ - #Christophe
+ - Fin ralenti
color: [255, 255, 0]
'c':
description:
- - Christophe
- - Début baston 2
+ - #Christophe
+ - Baston 2
color: [255, 255, 0]
'v':
description:
- - Auréliane
- - Stop baston 2
- color: [0, 255, 255]
+ - #Auréliane
+ - Fin baston 2
+ color: [0, 190, 27]
keys:
)
def set_description(self, description):
- self.description = description
+ self.description = [str(desc) for desc in description]
def set_color(self, color):
self.custom_color = tuple(color)
self.surface.blit(text, (5,5))
is_first_line = True
- offset = 11 + text_police.get_linesize()
+ offset = 11 + text_police.get_linesize() - 4
first_line_offset = 18
for description in self.description:
text = text_police.render(description, True, (0,0,0))
self.surface.blit(text, (first_line_offset, 9))
is_first_line = False
else:
- self.surface.blit(text, (5, offset))
- offset += text_police.get_linesize()
+ self.surface.blit(text, (3, offset))
+ offset += text_police.get_linesize() - 4
background_surface.blit(self.surface, self.position)
self.draw_lock.release()
should_redraw_key = key.draw(self.background)
if should_redraw_key:
- threading.Thread(target = key.poll_redraw, args = [self.background]).start()
+ threading.Thread(name = "MSPollRedraw", target = key.poll_redraw, args = [self.background]).start()
self.blit()
def blit(self):
self.sound = None
self.loaded = False
- threading.Thread(target = self.load_sound, args = [lock]).start()
+ threading.Thread(name = "MSMusicLoad", target = self.load_sound, args = [lock]).start()
def load_sound(self, lock):
lock.acquire()
context = 'normal'
+#### Normal workflow ####
while 1:
event = pygame.event.wait()
event.mod == 4160 and
event.key == pygame.K_c):
for thread in threading.enumerate():
- if thread is threading.current_thread():
+ if thread.getName()[0:2] != "MS":
continue
thread.join()
if event.type == pygame.KEYDOWN:
key = mapping.find_by_key_num(event.key)
if key is not None:
- threading.Thread(target=key.do_actions).start()
+ threading.Thread(name = "MSKeyAction", target=key.do_actions).start()
elif event.type == pygame.MOUSEBUTTONUP:
key = mapping.find_by_collidepoint(pygame.mouse.get_pos())
if key is not None:
- threading.Thread(target=key.list_actions, args = [screen]).start()
+ threading.Thread(name = "MSClic", target=key.list_actions, args = [screen]).start()
draw_lock.acquire()
pygame.display.flip()
draw_lock.release()
+#### In Ipython ####
+# for thread in threading.enumerate():
+# if thread.getName()[0:2] != "MS":
+# continue
+# thread.join()