+ elif mode == PLAYING_MODES_DICT['NORMAL'] :
+ EventDispatcher.addEventListener(events.COLOVER, self.handleNormalColumnOver)
+ EventDispatcher.addEventListener(events.COLDOWN, self.handleColumnDown)
+ EventDispatcher.addEventListener(events.COLUP, self.handleColumnUp)
+
+ elif mode == PLAYING_MODES_DICT['ADVANCED'] :
+ EventDispatcher.addEventListener(events.COLDOWN, self.handleColumnDown)
+ EventDispatcher.addEventListener(events.COLUP, self.handleColumnUp)
+
+ elif mode == PLAYING_MODES_DICT['EXPERT'] :
+ EventDispatcher.addEventListener(events.COLDOWN, self.handleExpertColumnDown)
+ EventDispatcher.addEventListener(events.COLUP, self.handleExpertColumnUp)
+
+
+ # --- HID listeners ---
+ def handleBeginnerColumnOver(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 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 and \
+ any(event.mouseEvent.buttons) and \
+ not self.currentNotePlayed :
+ self.playnote(col, event.pos)
+ self.currentNotePlayed = True
+
+ def handleColumnDown(self, event) :
+ col = event.column
+ if col.state:
+ self.playnote(col, event.pos)
+ self.currentNotePlayed = True