X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/9845b232ab53ef98733306299e1a52afbabb4e70..ae79067c99dcb4473df80ddd5eb24395d90ab6d3:/src/minwii/widgets/home.py?ds=sidebyside diff --git a/src/minwii/widgets/home.py b/src/minwii/widgets/home.py index 5b34403..b395eb6 100755 --- a/src/minwii/widgets/home.py +++ b/src/minwii/widgets/home.py @@ -52,7 +52,9 @@ class Home(object, Table) : self.font = pygame.font.Font(None,70) 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() @@ -79,6 +81,15 @@ class Home(object, Table) : 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() @@ -86,7 +97,7 @@ class Home(object, Table) : 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))) @@ -112,6 +123,14 @@ class Home(object, Table) : 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