'padding_left' : 20}
-class Home(object, Table) :
+class Home(Table) :
"""
Écran de démarrage de minwii
"""
self.nwiimotes = params.get('nwiimotes', 0)
self.songFile = params.get('songFile', '')
self.spaceSize = (100,100)
- self.font = pygame.font.Font(None,70)
+ self.font = pygame.font.Font(None,90)
self._fill()
self.selectedPlayMode = params.get('playMode', 'NORMAL')
+ self.displayNotes = params.get('displayNotes', True)
self.selectedWiimoteIndex = params.get('wiimoteIndex', 0)
+ self.exitApp = False
self._initLocalListeners()
self.tr()
caption = '' if not self.songFile else FileOpenDialog.getSongTitle(self.songFile)
- self.songTitle = self.createLabel(caption)
+ self.songTitle = self.createLabel(caption, font=pygame.font.Font(None,60))
st = STYLE_RIGHT_COL.copy()
del st['padding_top']
self.td(self.songTitle, style = st)
for k, caption in PLAYING_MODES :
self.modeSelect.add(self.createLabel(caption), k)
self.td(self.modeSelect,colspan=3, style=STYLE_RIGHT_COL)
+
+ # affichage / masquage des noms de notes
+ self.tr()
+ self.td(self.createLabel("Notes :"), style=STYLE_LEFT_COL)
+ self.displayNotesSelect = Select(True)
+ for k, caption in ((True, 'Oui'), (False, 'Non')) :
+ self.displayNotesSelect.add(self.createLabel(caption), k)
+ self.td(self.displayNotesSelect, style=STYLE_RIGHT_COL)
+
# choix des wiimotes
self.tr()
playerTable = Table()
self.selectedWiimote = Group(name='selectedWiimote', value=0)
- for i in range(self.nwiimotes):
+ for i in range(self.nwiimotes - 1):
r = Radio(self.selectedWiimote, i)
playerTable.td(r)
playerTable.td(self.createLabel(" %d " % (i+1)))
else :
self.playButton.disabled = False
+ @property
+ def displayNotes(self) :
+ return self.displayNotesSelect.value
+
+ @displayNotes.setter
+ def displayNotes(self, value) :
+ self.displayNotesSelect.value = value
+
@property
def selectedWiimoteIndex(self) :
return self.selectedWiimote.value
if dlg.value and os.path.isfile(dlg.value):
self.remove(self.songTitle)
title = FileOpenDialog.getSongTitle(dlg.value)
- self.songTitle = self.createLabel(title)
+ self.songTitle = self.createLabel(title, font= pygame.font.Font(None,60))
self.td(self.songTitle, col=1, row=1, style=STYLE_RIGHT_COL)
self.songFile = dlg.value
self.playButton.disabled = False