def _plugListeners(self, mode) :
"initialisation des gestionnaires d'événements en fonction du mode"
- if mode == PLAYING_MODES_DICT['EASY'] :
+ if mode == PLAYING_MODES_DICT['BEGINNER'] :
+ EventDispatcher.addEventListener(events.COLOVER, self.handleBeginnerColumnOver)
+
+ elif mode == PLAYING_MODES_DICT['EASY'] :
+ EventDispatcher.addEventListener(events.COLDOWN, self.handleEasyColumnDown)
EventDispatcher.addEventListener(events.COLOVER, self.handleEasyColumnOver)
elif mode == PLAYING_MODES_DICT['NORMAL'] :
# --- HID listeners ---
- def handleEasyColumnOver(self, event) :
+ def handleBeginnerColumnOver(self, event) :
col = event.column
if col.state and not self.currentNotePlayed :
self.playnote(col, event.pos)
self.quarterNoteDuration)
)
self.currentNotePlayed = True
+
+ def handleEasyColumnOver(self, event) :
+ col = event.column
+ if col.state and \
+ any(event.mouseEvent.buttons) and \
+ not self.currentNotePlayed :
+ self.playnote(col, event.pos)
+ SongPlayingScreen.setNoteTimeout(
+ int(self.currentNote.duration * \
+ self.quarterNoteDuration)
+ )
+ self.currentNotePlayed = True
+
def handleNormalColumnOver(self, event) :
col = event.column
if col.state:
self.playnote(col, event.pos)
self.currentNotePlayed = True
+
+ def handleEasyColumnDown(self, event) :
+ col = event.column
+ if col.state and \
+ not self.currentNotePlayed :
+ self.playnote(col, event.pos)
+ SongPlayingScreen.setNoteTimeout(
+ int(self.currentNote.duration * \
+ self.quarterNoteDuration)
+ )
+ self.currentNotePlayed = True
+
def handleExpertColumnDown(self, event) :
col = event.column