+
+ def _wiimotesEventCallBack(self, wt, id, wmp) :
+ if self.screen == SCREEN_PLAY :
+ pygame_wiimouse._default_event_cb(wt, id, wmp)
+
+ wm = wmp[0]
+ if id == self.nwiimotes - 1 :
+ # le bouton Home de la télécommande permet de sortir
+ # (envoi d'un événement clavier « q »)
+ if wiiuse.is_just_pressed(wm, wiiuse.button['Home']) :
+ event = pygame.event.Event(pygame.KEYDOWN,
+ key = pygame.K_q,
+ unicode = u'q')
+ pygame.event.post(event)
+ elif wiiuse.is_just_pressed(wm, wiiuse.button['+']) :
+ self.synth.inc_gain()
+ elif wiiuse.is_just_pressed(wm, wiiuse.button['-']) :
+ self.synth.dec_gain()
+ elif wiiuse.is_just_pressed(wm, wiiuse.button['1']) and self.playingScreen :
+ self.playingScreen.tempoTrimUp()
+ elif wiiuse.is_just_pressed(wm, wiiuse.button['2']) and self.playingScreen :
+ self.playingScreen.tempoTrimDown()