Pretty Generation Setup options

This commit is contained in:
Mike A. Trethewey
2020-02-11 02:25:09 -08:00
parent 88bb18f12f
commit 8788a2bec2
3 changed files with 39 additions and 14 deletions

View File

@@ -53,9 +53,9 @@ def bottom_frame(self,parent,args=None):
guiargs.heartbeep = parent.gameOptionsWindow.gameOptionsWidgets["heartbeep"].storageVar.get()
guiargs.heartcolor = parent.gameOptionsWindow.gameOptionsWidgets["heartcolor"].storageVar.get()
guiargs.fastmenu = parent.gameOptionsWindow.gameOptionsWidgets["menuspeed"].storageVar.get()
guiargs.create_spoiler = bool(parent.generationSetupWindow.createSpoilerVar.get())
guiargs.skip_playthrough = not bool(parent.generationSetupWindow.createSpoilerVar.get())
guiargs.suppress_rom = bool(parent.generationSetupWindow.suppressRomVar.get())
guiargs.create_spoiler = bool(parent.generationSetupWindow.generationWidgets["spoiler"].storageVar.get())
guiargs.skip_playthrough = not bool(parent.generationSetupWindow.generationWidgets["spoiler"].storageVar.get())
guiargs.suppress_rom = bool(parent.generationSetupWindow.generationWidgets["suppressrom"].storageVar.get())
guiargs.openpyramid = bool(parent.entrandoWindow.entrandoWidgets["openpyramid"].storageVar.get())
guiargs.mapshuffle = bool(parent.dungeonRandoWindow.dungeonWidgets["mapshuffle"].storageVar.get())
guiargs.compassshuffle = bool(parent.dungeonRandoWindow.dungeonWidgets["compassshuffle"].storageVar.get())

View File

@@ -4,8 +4,8 @@ def loadcliargs(gui,args):
if type(v) is dict:
setattr(args, k, v[1]) # only get values for player 1 for now
# load values from commandline args
gui.generationSetupWindow.createSpoilerVar.set(int(args.create_spoiler))
gui.generationSetupWindow.suppressRomVar.set(int(args.suppress_rom))
gui.generationSetupWindow.generationWidgets["spoiler"].storageVar.set(int(args.create_spoiler))
gui.generationSetupWindow.generationWidgets["suppressrom"].storageVar.set(int(args.suppress_rom))
gui.dungeonRandoWindow.dungeonWidgets["mapshuffle"].storageVar.set(args.mapshuffle)
gui.dungeonRandoWindow.dungeonWidgets["compassshuffle"].storageVar.set(args.compassshuffle)
gui.dungeonRandoWindow.dungeonWidgets["smallkeyshuffle"].storageVar.set(args.keyshuffle)

View File

@@ -1,22 +1,47 @@
import os
from tkinter import ttk, filedialog, IntVar, StringVar, Button, Checkbutton, Entry, Frame, Label, E, W, LEFT, RIGHT, X
import gui.widgets as widgets
def generation_page(parent,working_dirs):
# Generation Setup
self = ttk.Frame(parent)
# Generation Setup options
self.generationWidgets = {}
## Generate Spoiler
self.createSpoilerVar = IntVar()
createSpoilerCheckbutton = Checkbutton(self, text="Create Spoiler Log", variable=self.createSpoilerVar)
createSpoilerCheckbutton.pack(anchor=W)
key = "spoiler"
self.generationWidgets[key] = widgets.make_widget(
self,
"checkbox",
self,
"Create Spoiler Log",
None
)
self.generationWidgets[key].pack(anchor=W)
## Don't make ROM
self.suppressRomVar = IntVar()
suppressRomCheckbutton = Checkbutton(self, text="Do not create patched Rom", variable=self.suppressRomVar)
suppressRomCheckbutton.pack(anchor=W)
key = "suppressrom"
self.generationWidgets[key] = widgets.make_widget(
self,
"checkbox",
self,
"Do not create patched ROM",
None
)
self.generationWidgets[key].pack(anchor=W)
## Use Custom Item Pool as defined in Custom tab
self.customVar = IntVar()
customCheckbutton = Checkbutton(self, text="Use custom item pool", variable=self.customVar)
customCheckbutton.pack(anchor=W)
key = "usecustompool"
self.generationWidgets[key] = widgets.make_widget(
self,
"checkbox",
self,
"Use custom item pool",
None
)
self.generationWidgets[key].pack(anchor=W)
## Locate base ROM
baseRomFrame = Frame(self)
baseRomLabel = Label(baseRomFrame, text='Base Rom: ')