summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
da27397)
BACKGROUND_LAYER = 0
FOREGROUND_LAYER = 1
CURSOR_LAYER = 2
BACKGROUND_LAYER = 0
FOREGROUND_LAYER = 1
CURSOR_LAYER = 2
-PLAYING_MODES = (('EASY' , u'Facile'),
- ('NORMAL' , u'Normal'),
- ('ADVANCED', u'Avancé'),
- ('EXPERT' , u'Expert'))
+PLAYING_MODES = (('BEGINNER' , u'Débutant'),
+ ('EASY' , u'Facile'),
+ ('NORMAL' , u'Normal'),
+ ('ADVANCED' , u'Avancé'),
+ ('EXPERT' , u'Expert'))
def _plugListeners(self, mode) :
"initialisation des gestionnaires d'événements en fonction du mode"
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'] :
EventDispatcher.addEventListener(events.COLOVER, self.handleEasyColumnOver)
elif mode == PLAYING_MODES_DICT['NORMAL'] :
- def handleEasyColumnOver(self, event) :
+ def handleBeginnerColumnOver(self, event) :
col = event.column
if col.state and not self.currentNotePlayed :
self.playnote(col, event.pos)
col = event.column
if col.state and not self.currentNotePlayed :
self.playnote(col, event.pos)
self.quarterNoteDuration)
)
self.currentNotePlayed = True
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
def handleNormalColumnOver(self, event) :
col = event.column
if col.state:
self.playnote(col, event.pos)
self.currentNotePlayed = True
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
def handleExpertColumnDown(self, event) :
col = event.column