def __init__(self, game): self.game = game self.insertBtn = toggleBtn(self.game) self.undoBtn = toggleBtn(self.game) self.redoBtn = toggleBtn(self.game) self.FLAG = 0 self.undo = [] self.redo = []
def __init__(self, game): self.game = game self.drumButton = toggleBtn(self.game) self.synthButton = toggleBtn(self.game) self.allButton = toggleBtn(self.game) self.drummain = DrumsMain(self.game) self.synthMain = SynthMain(self.game) self.goBackToMenu = toggleBtn(self.game) self.playboth = PlayDrumsAndSynth(self.game) self.mainMenuFlag = 1 self.Status = "None"
def __init__(self, game): self.game = game self.width = self.game.displayW * .65 self.height = self.game.displayH * .575 self.x = (self.game.displayW - self.width) / 2. + self.game.displayW * .05 self.y = self.game.displayH * .1 # divides the grid by height and width into 16 and takes the smallest then rounds to the lowest 10th. self.buttonSize = int(min(self.width / 16., self.height / 16.)) / 10 * 10 # this would only happen if user can modify screen size and there is no minimum if self.buttonSize == 0: self.buttonSize = 5 self.xbuffer = (self.width - self.buttonSize * 16) / 4. self.ybuffer = (self.height - self.buttonSize * 4) / 8. self.testImg = pygame.image.load('SynthPage/Sprits/5RN.png') self.smallImg = pygame.transform.scale(self.testImg, (self.game.buttonSize, self.game.buttonSize)) self.BigImg = pygame.transform.scale(self.testImg, (self.game.buttonSize * 2, self.game.buttonSize * 2)) self.notes = startState() self.btns = [0] * 16 * 4 for i in range(len(self.btns)): self.btns[i] = toggleBtn(self.game) self.imgDict =self.parseFileNames(getFileNames('SynthPage/Sprits'),"SynthPage/Sprits/") self.activeToggle = -1
def __init__(self, game): self.game = game self.rootButton = toggleBtn(self.game) self.rootNote = "C" self.rootDict = None
def __init__(self, game): self.game = game self.playandpause = PlayAll(self.game, "Play", self.game.displayW * .05, self.game.displayH * .05, 10, 10, self.game.white, self.game.green) self.stopbtn = Stop(self.game, "Stop", self.game.displayW * .05 * 2 + 10, self.game.displayH * .05, 10, 10, self.game.white, self.game.green) self.question = toggleBtn(self.game) self.EpilepsyQuestion = 0 self.EpilepticFlag = 0 self.yesBtn = toggleBtn(self.game) self.noBtn = toggleBtn(self.game)
def __init__(self, game): self.game = game self.restList, self.restDList, self.noteList, self.noteDList = parseFileNames( getFileNames('SynthPage/Sprits'), "SynthPage/Sprits/") self.dottedBtn = toggleBtn(self.game) self.noteBtn = toggleBtn(self.game) self.width = self.game.displayW * .6 self.height = self.game.displayH * .3 self.x = int((self.game.displayW - self.width) / 2 + self.width * .1) self.y = self.game.displayH - self.height self.buttonSize = 80 self.restSprits = self.getSprits(self.restList) self.restDSprits = self.getSprits(self.restDList) self.noteSprits = self.getSprits(self.noteList) self.noteDSprits = self.getSprits(self.noteDList) self.restgrid = [0] * len(self.restList) self.restDgrid = [0] * len(self.restList) self.notegrid = [0] * len(self.restList) self.noteDgrid = [0] * len(self.restList) for i in range(len(self.restList)): self.restgrid[i] = toggleBtn(self.game) self.restDgrid[i] = toggleBtn(self.game) self.notegrid[i] = toggleBtn(self.game) self.noteDgrid[i] = toggleBtn(self.game) self.printstr = ""
def __init__(self, game): self.game = game self.notes = [ 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B' ] self.notesButtons = [0] * len(self.notes) for i in range(len(self.notes)): self.notesButtons[i] = toggleBtn(self.game, 1) self.notesButtons[0].toggleState = 1 self.activeNote = "C"
def __init__(self, game): self.game = game self.play = toggleBtn(game)