+ self.spaceSize = (100,100)
+ self.font = pygame.font.Font(None,70)
+ self._fill()
+
+
+ def _fill(self):
+ self.tr()
+ self.td(Spacer(*self.spaceSize))
+
+
+ # bouton pour browser de fichiers
+ self.tr()
+ self.td(self.createLabel("Chanson :"))
+ self.browseButton = Button(self.createLabel("Choisir..."))
+ self.td(self.browseButton,colspan=2)
+ self.songSwitch = Switch(False)
+ self.td(self.songSwitch)
+
+ self.tr()
+ self.td(Spacer(*self.spaceSize))
+
+ # choix du niveau
+ self.tr()
+ self.td(self.createLabel("Niveau :"))
+ self.modeSelect = Select('easy')
+ for key in modeDict.keys() :
+ self.modeSelect.add(self.createLabel(reversedReadabilityDict[key]),key)
+ self.td(self.modeSelect,colspan=3)
+
+ self.tr()
+ self.td(Spacer(*self.spaceSize))
+
+ # choix des wiimotes
+ self.tr()
+ self.td(self.createLabel("Joueurs :", self.font))
+ playerTable = Table()
+ self.activeWiimoteSwitches = []
+ for i in range(4):
+ s = Switch(False)
+ playerTable.td(s)
+ playerTable.td(self.createLabel(" %d " % (i+1)))
+ self.activeWiimoteSwitches.append(s)
+ self.td(playerTable,colspan = 3)
+
+ self.tr()
+ self.td(Spacer(*self.spaceSize))
+
+ # boutons jouer / quitter
+ self.tr()
+ self.quitButton = Button(self.createLabel("Quitter"))
+ self.td(self.quitButton)
+ self.goButton = Button(self.createLabel("Jouer"))
+ self.td(self.goButton,colspan=3)
+
+ self.tr()
+ self.td(Spacer(500,500))
+
+ def createLabel(self,text,font = None):
+ if font == None :
+ font = self.font
+ w,h = self.font.size(text)
+ label = Label(text,width=w,height=h,font = font)
+ return(label)
+
+