Update GUI

The GUI was dysfunctional after the latest round of updates as it failed to address several new v31 features. The GUI should work again with this update and should allow proper interaction with all relevant options. Some aesthetic rework was necessary to account for the new large number of dropdowns.
This commit is contained in:
AmazingAmpharos 2019-10-23 20:46:09 -05:00 committed by compiling
parent edd656b903
commit 733f6b1a61
1 changed files with 85 additions and 29 deletions

114
Gui.py
View File

@ -90,6 +90,34 @@ def guiMain(args=None):
fileDialogFrame = Frame(rightHalfFrame) fileDialogFrame = Frame(rightHalfFrame)
heartbeepFrame = Frame(fileDialogFrame)
heartbeepVar = StringVar()
heartbeepVar.set('normal')
heartbeepOptionMenu = OptionMenu(heartbeepFrame, heartbeepVar, 'double', 'normal', 'half', 'quarter', 'off')
heartbeepOptionMenu.pack(side=RIGHT)
heartbeepLabel = Label(heartbeepFrame, text='Heartbeep sound rate')
heartbeepLabel.pack(side=LEFT, padx=(0,52))
heartcolorFrame = Frame(fileDialogFrame)
heartcolorVar = StringVar()
heartcolorVar.set('red')
heartcolorOptionMenu = OptionMenu(heartcolorFrame, heartcolorVar, 'red', 'blue', 'green', 'yellow', 'random')
heartcolorOptionMenu.pack(side=RIGHT)
heartcolorLabel = Label(heartcolorFrame, text='Heart color')
heartcolorLabel.pack(side=LEFT, padx=(0,127))
fastMenuFrame = Frame(fileDialogFrame)
fastMenuVar = StringVar()
fastMenuVar.set('normal')
fastMenuOptionMenu = OptionMenu(fastMenuFrame, fastMenuVar, 'normal', 'instant', 'double', 'triple', 'quadruple', 'half')
fastMenuOptionMenu.pack(side=RIGHT)
fastMenuLabel = Label(fastMenuFrame, text='Menu speed')
fastMenuLabel.pack(side=LEFT, padx=(0,100))
heartbeepFrame.pack(expand=True, anchor=E)
heartcolorFrame.pack(expand=True, anchor=E)
fastMenuFrame.pack(expand=True, anchor=E)
romDialogFrame = Frame(fileDialogFrame) romDialogFrame = Frame(fileDialogFrame)
baseRomLabel = Label(romDialogFrame, text='Base Rom') baseRomLabel = Label(romDialogFrame, text='Base Rom')
romVar = StringVar() romVar = StringVar()
@ -144,7 +172,7 @@ def guiMain(args=None):
modeVar.set('open') modeVar.set('open')
modeOptionMenu = OptionMenu(modeFrame, modeVar, 'standard', 'open', 'inverted') modeOptionMenu = OptionMenu(modeFrame, modeVar, 'standard', 'open', 'inverted')
modeOptionMenu.pack(side=RIGHT) modeOptionMenu.pack(side=RIGHT)
modeLabel = Label(modeFrame, text='Game Mode') modeLabel = Label(modeFrame, text='Game mode')
modeLabel.pack(side=LEFT) modeLabel.pack(side=LEFT)
logicFrame = Frame(drowDownFrame) logicFrame = Frame(drowDownFrame)
@ -163,14 +191,46 @@ def guiMain(args=None):
goalLabel = Label(goalFrame, text='Game goal') goalLabel = Label(goalFrame, text='Game goal')
goalLabel.pack(side=LEFT) goalLabel.pack(side=LEFT)
crystalsGTFrame = Frame(drowDownFrame)
crystalsGTVar = StringVar()
crystalsGTVar.set('7')
crystalsGTOptionMenu = OptionMenu(crystalsGTFrame, crystalsGTVar, '0', '1', '2', '3', '4', '5', '6', '7', 'random')
crystalsGTOptionMenu.pack(side=RIGHT)
crystalsGTLabel = Label(crystalsGTFrame, text='Crystals to open Ganon\'s Tower')
crystalsGTLabel.pack(side=LEFT)
crystalsGanonFrame = Frame(drowDownFrame)
crystalsGanonVar = StringVar()
crystalsGanonVar.set('7')
crystalsGanonOptionMenu = OptionMenu(crystalsGanonFrame, crystalsGanonVar, '0', '1', '2', '3', '4', '5', '6', '7', 'random')
crystalsGanonOptionMenu.pack(side=RIGHT)
crystalsGanonLabel = Label(crystalsGanonFrame, text='Crystals to fight Ganon')
crystalsGanonLabel.pack(side=LEFT)
swordFrame = Frame(drowDownFrame)
swordVar = StringVar()
swordVar.set('random')
swordOptionMenu = OptionMenu(swordFrame, swordVar, 'random', 'assured', 'swordless', 'vanilla')
swordOptionMenu.pack(side=RIGHT)
swordLabel = Label(swordFrame, text='Sword availability')
swordLabel.pack(side=LEFT)
difficultyFrame = Frame(drowDownFrame) difficultyFrame = Frame(drowDownFrame)
difficultyVar = StringVar() difficultyVar = StringVar()
difficultyVar.set('normal') difficultyVar.set('normal')
difficultyOptionMenu = OptionMenu(difficultyFrame, difficultyVar, 'normal', 'hard', 'expert') difficultyOptionMenu = OptionMenu(difficultyFrame, difficultyVar, 'normal', 'hard', 'expert')
difficultyOptionMenu.pack(side=RIGHT) difficultyOptionMenu.pack(side=RIGHT)
difficultyLabel = Label(difficultyFrame, text='Game difficulty') difficultyLabel = Label(difficultyFrame, text='Difficulty: item pool')
difficultyLabel.pack(side=LEFT) difficultyLabel.pack(side=LEFT)
itemfunctionFrame = Frame(drowDownFrame)
itemfunctionVar = StringVar()
itemfunctionVar.set('normal')
itemfunctionOptionMenu = OptionMenu(itemfunctionFrame, itemfunctionVar, 'normal', 'hard', 'expert')
itemfunctionOptionMenu.pack(side=RIGHT)
itemfunctionLabel = Label(itemfunctionFrame, text='Difficulty: item functionality')
itemfunctionLabel.pack(side=LEFT)
timerFrame = Frame(drowDownFrame) timerFrame = Frame(drowDownFrame)
timerVar = StringVar() timerVar = StringVar()
timerVar.set('none') timerVar.set('none')
@ -187,6 +247,14 @@ def guiMain(args=None):
progressiveLabel = Label(progressiveFrame, text='Progressive equipment') progressiveLabel = Label(progressiveFrame, text='Progressive equipment')
progressiveLabel.pack(side=LEFT) progressiveLabel.pack(side=LEFT)
accessibilityFrame = Frame(drowDownFrame)
accessibilityVar = StringVar()
accessibilityVar.set('items')
accessibilityOptionMenu = OptionMenu(accessibilityFrame, accessibilityVar, 'items', 'locations', 'none')
accessibilityOptionMenu.pack(side=RIGHT)
accessibilityLabel = Label(accessibilityFrame, text='Item accessibility')
accessibilityLabel.pack(side=LEFT)
algorithmFrame = Frame(drowDownFrame) algorithmFrame = Frame(drowDownFrame)
algorithmVar = StringVar() algorithmVar = StringVar()
algorithmVar.set('balanced') algorithmVar.set('balanced')
@ -203,41 +271,19 @@ def guiMain(args=None):
shuffleLabel = Label(shuffleFrame, text='Entrance shuffle algorithm') shuffleLabel = Label(shuffleFrame, text='Entrance shuffle algorithm')
shuffleLabel.pack(side=LEFT) shuffleLabel.pack(side=LEFT)
heartbeepFrame = Frame(drowDownFrame)
heartbeepVar = StringVar()
heartbeepVar.set('normal')
heartbeepOptionMenu = OptionMenu(heartbeepFrame, heartbeepVar, 'double', 'normal', 'half', 'quarter', 'off')
heartbeepOptionMenu.pack(side=RIGHT)
heartbeepLabel = Label(heartbeepFrame, text='Heartbeep sound rate')
heartbeepLabel.pack(side=LEFT)
heartcolorFrame = Frame(drowDownFrame)
heartcolorVar = StringVar()
heartcolorVar.set('red')
heartcolorOptionMenu = OptionMenu(heartcolorFrame, heartcolorVar, 'red', 'blue', 'green', 'yellow', 'random')
heartcolorOptionMenu.pack(side=RIGHT)
heartcolorLabel = Label(heartcolorFrame, text='Heart color')
heartcolorLabel.pack(side=LEFT)
fastMenuFrame = Frame(drowDownFrame)
fastMenuVar = StringVar()
fastMenuVar.set('normal')
fastMenuOptionMenu = OptionMenu(fastMenuFrame, fastMenuVar, 'normal', 'instant', 'double', 'triple', 'quadruple', 'half')
fastMenuOptionMenu.pack(side=RIGHT)
fastMenuLabel = Label(fastMenuFrame, text='Menu speed')
fastMenuLabel.pack(side=LEFT)
modeFrame.pack(expand=True, anchor=E) modeFrame.pack(expand=True, anchor=E)
logicFrame.pack(expand=True, anchor=E) logicFrame.pack(expand=True, anchor=E)
goalFrame.pack(expand=True, anchor=E) goalFrame.pack(expand=True, anchor=E)
crystalsGTFrame.pack(expand=True, anchor=E)
crystalsGanonFrame.pack(expand=True, anchor=E)
swordFrame.pack(expand=True, anchor=E)
difficultyFrame.pack(expand=True, anchor=E) difficultyFrame.pack(expand=True, anchor=E)
itemfunctionFrame.pack(expand=True, anchor=E)
timerFrame.pack(expand=True, anchor=E) timerFrame.pack(expand=True, anchor=E)
progressiveFrame.pack(expand=True, anchor=E) progressiveFrame.pack(expand=True, anchor=E)
accessibilityFrame.pack(expand=True, anchor=E)
algorithmFrame.pack(expand=True, anchor=E) algorithmFrame.pack(expand=True, anchor=E)
shuffleFrame.pack(expand=True, anchor=E) shuffleFrame.pack(expand=True, anchor=E)
heartbeepFrame.pack(expand=True, anchor=E)
heartcolorFrame.pack(expand=True, anchor=E)
fastMenuFrame.pack(expand=True, anchor=E)
enemizerFrame = LabelFrame(randomizerWindow, text="Enemizer", padx=5, pady=5) enemizerFrame = LabelFrame(randomizerWindow, text="Enemizer", padx=5, pady=5)
enemizerFrame.columnconfigure(0, weight=1) enemizerFrame.columnconfigure(0, weight=1)
@ -315,9 +361,14 @@ def guiMain(args=None):
guiargs.mode = modeVar.get() guiargs.mode = modeVar.get()
guiargs.logic = logicVar.get() guiargs.logic = logicVar.get()
guiargs.goal = goalVar.get() guiargs.goal = goalVar.get()
guiargs.crystals_gt = crystalsGTVar.get()
guiargs.crystals_ganon = crystalsGanonVar.get()
guiargs.swords = swordVar.get()
guiargs.difficulty = difficultyVar.get() guiargs.difficulty = difficultyVar.get()
guiargs.item_functionality = itemfunctionVar.get()
guiargs.timer = timerVar.get() guiargs.timer = timerVar.get()
guiargs.progressive = progressiveVar.get() guiargs.progressive = progressiveVar.get()
guiargs.accessibility = accessibilityVar.get()
guiargs.algorithm = algorithmVar.get() guiargs.algorithm = algorithmVar.get()
guiargs.shuffle = shuffleVar.get() guiargs.shuffle = shuffleVar.get()
guiargs.heartbeep = heartbeepVar.get() guiargs.heartbeep = heartbeepVar.get()
@ -1074,10 +1125,15 @@ def guiMain(args=None):
if args.seed: if args.seed:
seedVar.set(str(args.seed)) seedVar.set(str(args.seed))
modeVar.set(args.mode) modeVar.set(args.mode)
swordVar.set(args.swords)
difficultyVar.set(args.difficulty) difficultyVar.set(args.difficulty)
itemfunctionVar.set(args.item_functionality)
timerVar.set(args.timer) timerVar.set(args.timer)
progressiveVar.set(args.progressive) progressiveVar.set(args.progressive)
accessibilityVar.set(args.accessibility)
goalVar.set(args.goal) goalVar.set(args.goal)
crystalsGTVar.set(args.crystals_gt)
crystalsGanonVar.set(args.crystals_ganon)
algorithmVar.set(args.algorithm) algorithmVar.set(args.algorithm)
shuffleVar.set(args.shuffle) shuffleVar.set(args.shuffle)
heartbeepVar.set(args.heartbeep) heartbeepVar.set(args.heartbeep)