Pretty Entrando options

This commit is contained in:
Mike A. Trethewey
2020-02-09 15:53:45 -08:00
parent 18e0008a99
commit f9fcfee57b
4 changed files with 63 additions and 30 deletions

View File

@@ -35,8 +35,8 @@ def bottom_frame(self,parent,args=None):
guiargs.names = parent.multiworldWindow.namesVar.get() guiargs.names = parent.multiworldWindow.namesVar.get()
guiargs.seed = int(parent.farBottomFrame.seedVar.get()) if parent.farBottomFrame.seedVar.get() else None guiargs.seed = int(parent.farBottomFrame.seedVar.get()) if parent.farBottomFrame.seedVar.get() else None
guiargs.count = int(parent.farBottomFrame.countVar.get()) if parent.farBottomFrame.countVar.get() != '1' else None guiargs.count = int(parent.farBottomFrame.countVar.get()) if parent.farBottomFrame.countVar.get() != '1' else None
guiargs.mode = parent.itemWindow.itemWidgets["worldState"].storageVar.get() guiargs.mode = parent.itemWindow.itemWidgets["worldstate"].storageVar.get()
guiargs.logic = parent.itemWindow.itemWidgets["logicLevel"].storageVar.get() guiargs.logic = parent.itemWindow.itemWidgets["logiclevel"].storageVar.get()
guiargs.goal = parent.itemWindow.itemWidgets["goal"].storageVar.get() guiargs.goal = parent.itemWindow.itemWidgets["goal"].storageVar.get()
guiargs.crystals_gt = parent.itemWindow.itemWidgets["crystals_gt"].storageVar.get() guiargs.crystals_gt = parent.itemWindow.itemWidgets["crystals_gt"].storageVar.get()
@@ -48,7 +48,7 @@ def bottom_frame(self,parent,args=None):
guiargs.progressive = parent.itemWindow.itemWidgets["progressives"].storageVar.get() guiargs.progressive = parent.itemWindow.itemWidgets["progressives"].storageVar.get()
guiargs.accessibility = parent.itemWindow.itemWidgets["accessibility"].storageVar.get() guiargs.accessibility = parent.itemWindow.itemWidgets["accessibility"].storageVar.get()
guiargs.algorithm = parent.itemWindow.itemWidgets["sortingalgo"].storageVar.get() guiargs.algorithm = parent.itemWindow.itemWidgets["sortingalgo"].storageVar.get()
guiargs.shuffle = parent.entrandoWindow.shuffleVar.get() guiargs.shuffle = parent.entrandoWindow.entrandoWidgets["entranceshuffle"].storageVar.get()
guiargs.door_shuffle = parent.dungeonRandoWindow.doorShuffleVar.get() guiargs.door_shuffle = parent.dungeonRandoWindow.doorShuffleVar.get()
guiargs.heartbeep = parent.gameOptionsWindow.heartbeepVar.get() guiargs.heartbeep = parent.gameOptionsWindow.heartbeepVar.get()
guiargs.heartcolor = parent.gameOptionsWindow.heartcolorVar.get() guiargs.heartcolor = parent.gameOptionsWindow.heartcolorVar.get()
@@ -56,7 +56,7 @@ def bottom_frame(self,parent,args=None):
guiargs.create_spoiler = bool(parent.generationSetupWindow.createSpoilerVar.get()) guiargs.create_spoiler = bool(parent.generationSetupWindow.createSpoilerVar.get())
guiargs.skip_playthrough = not bool(parent.generationSetupWindow.createSpoilerVar.get()) guiargs.skip_playthrough = not bool(parent.generationSetupWindow.createSpoilerVar.get())
guiargs.suppress_rom = bool(parent.generationSetupWindow.suppressRomVar.get()) guiargs.suppress_rom = bool(parent.generationSetupWindow.suppressRomVar.get())
guiargs.openpyramid = bool(parent.entrandoWindow.openpyramidVar.get()) guiargs.openpyramid = bool(parent.entrandoWindow.entrandoWidgets["openpyramid"].storageVar.get())
guiargs.mapshuffle = bool(parent.dungeonRandoWindow.mapshuffleVar.get()) guiargs.mapshuffle = bool(parent.dungeonRandoWindow.mapshuffleVar.get())
guiargs.compassshuffle = bool(parent.dungeonRandoWindow.compassshuffleVar.get()) guiargs.compassshuffle = bool(parent.dungeonRandoWindow.compassshuffleVar.get())
guiargs.keyshuffle = bool(parent.dungeonRandoWindow.keyshuffleVar.get()) guiargs.keyshuffle = bool(parent.dungeonRandoWindow.keyshuffleVar.get())
@@ -66,7 +66,7 @@ def bottom_frame(self,parent,args=None):
guiargs.disablemusic = bool(parent.gameOptionsWindow.disableMusicVar.get()) guiargs.disablemusic = bool(parent.gameOptionsWindow.disableMusicVar.get())
guiargs.ow_palettes = parent.gameOptionsWindow.owPalettesVar.get() guiargs.ow_palettes = parent.gameOptionsWindow.owPalettesVar.get()
guiargs.uw_palettes = parent.gameOptionsWindow.uwPalettesVar.get() guiargs.uw_palettes = parent.gameOptionsWindow.uwPalettesVar.get()
guiargs.shuffleganon = bool(parent.entrandoWindow.shuffleGanonVar.get()) guiargs.shuffleganon = bool(parent.entrandoWindow.entrandoWidgets["shuffleganon"].storageVar.get())
guiargs.hints = bool(parent.gameOptionsWindow.hintsVar.get()) guiargs.hints = bool(parent.gameOptionsWindow.hintsVar.get())
guiargs.enemizercli = parent.enemizerWindow.enemizerCLIpathVar.get() guiargs.enemizercli = parent.enemizerWindow.enemizerCLIpathVar.get()
guiargs.shufflebosses = parent.enemizerWindow.enemizerBossVar.get() guiargs.shufflebosses = parent.enemizerWindow.enemizerBossVar.get()

View File

@@ -11,7 +11,7 @@ def loadcliargs(gui,args):
gui.dungeonRandoWindow.keyshuffleVar.set(args.keyshuffle) gui.dungeonRandoWindow.keyshuffleVar.set(args.keyshuffle)
gui.dungeonRandoWindow.bigkeyshuffleVar.set(args.bigkeyshuffle) gui.dungeonRandoWindow.bigkeyshuffleVar.set(args.bigkeyshuffle)
gui.itemWindow.itemWidgets["retro"].storageVar.set(args.retro) gui.itemWindow.itemWidgets["retro"].storageVar.set(args.retro)
gui.entrandoWindow.openpyramidVar.set(args.openpyramid) gui.entrandoWindow.entrandoWidgets["openpyramid"].storageVar.set(args.openpyramid)
gui.gameOptionsWindow.quickSwapVar.set(int(args.quickswap)) gui.gameOptionsWindow.quickSwapVar.set(int(args.quickswap))
gui.gameOptionsWindow.disableMusicVar.set(int(args.disablemusic)) gui.gameOptionsWindow.disableMusicVar.set(int(args.disablemusic))
if args.multi: if args.multi:
@@ -20,7 +20,7 @@ def loadcliargs(gui,args):
gui.farBottomFrame.countVar.set(str(args.count)) gui.farBottomFrame.countVar.set(str(args.count))
if args.seed: if args.seed:
gui.farBottomFrame.seedVar.set(str(args.seed)) gui.farBottomFrame.seedVar.set(str(args.seed))
gui.itemWindow.itemWidgets["worldState"].storageVar.set(args.mode) gui.itemWindow.itemWidgets["worldstate"].storageVar.set(args.mode)
gui.itemWindow.itemWidgets["weapons"].storageVar.set(args.swords) gui.itemWindow.itemWidgets["weapons"].storageVar.set(args.swords)
gui.itemWindow.itemWidgets["itempool"].storageVar.set(args.difficulty) gui.itemWindow.itemWidgets["itempool"].storageVar.set(args.difficulty)
gui.itemWindow.itemWidgets["itemfunction"].storageVar.set(args.item_functionality) gui.itemWindow.itemWidgets["itemfunction"].storageVar.set(args.item_functionality)
@@ -31,14 +31,14 @@ def loadcliargs(gui,args):
gui.itemWindow.itemWidgets["crystals_gt"].storageVar.set(args.crystals_gt) gui.itemWindow.itemWidgets["crystals_gt"].storageVar.set(args.crystals_gt)
gui.itemWindow.itemWidgets["crystals_ganon"].storageVar.set(args.crystals_ganon) gui.itemWindow.itemWidgets["crystals_ganon"].storageVar.set(args.crystals_ganon)
gui.itemWindow.itemWidgets["sortingalgo"].storageVar.set(args.algorithm) gui.itemWindow.itemWidgets["sortingalgo"].storageVar.set(args.algorithm)
gui.entrandoWindow.shuffleVar.set(args.shuffle) gui.entrandoWindow.entrandoWidgets["entranceshuffle"].storageVar.set(args.shuffle)
gui.dungeonRandoWindow.doorShuffleVar.set(args.door_shuffle) gui.dungeonRandoWindow.doorShuffleVar.set(args.door_shuffle)
gui.gameOptionsWindow.heartcolorVar.set(args.heartcolor) gui.gameOptionsWindow.heartcolorVar.set(args.heartcolor)
gui.gameOptionsWindow.heartbeepVar.set(args.heartbeep) gui.gameOptionsWindow.heartbeepVar.set(args.heartbeep)
gui.gameOptionsWindow.fastMenuVar.set(args.fastmenu) gui.gameOptionsWindow.fastMenuVar.set(args.fastmenu)
gui.itemWindow.itemWidgets["logicLevel"].storageVar.set(args.logic) gui.itemWindow.itemWidgets["logiclevel"].storageVar.set(args.logic)
gui.generationSetupWindow.romVar.set(args.rom) gui.generationSetupWindow.romVar.set(args.rom)
gui.entrandoWindow.shuffleGanonVar.set(args.shuffleganon) gui.entrandoWindow.entrandoWidgets["shuffleganon"].storageVar.set(args.shuffleganon)
gui.gameOptionsWindow.hintsVar.set(args.hints) gui.gameOptionsWindow.hintsVar.set(args.hints)
gui.enemizerWindow.enemizerCLIpathVar.set(args.enemizercli) gui.enemizerWindow.enemizerCLIpathVar.set(args.enemizercli)
gui.enemizerWindow.potShuffleVar.set(args.shufflepots) gui.enemizerWindow.potShuffleVar.set(args.shufflepots)

View File

@@ -1,27 +1,59 @@
from tkinter import ttk, IntVar, StringVar, Checkbutton, Frame, Label, OptionMenu, E, W, LEFT, RIGHT from tkinter import ttk, IntVar, StringVar, Checkbutton, Frame, Label, OptionMenu, E, W, LEFT, RIGHT
import gui.widgets as widgets
def entrando_page(parent): def entrando_page(parent):
# Entrance Randomizer # Entrance Randomizer
self = ttk.Frame(parent) self = ttk.Frame(parent)
# Entrance Randomizer options # Entrance Randomizer options
self.entrandoWidgets = {}
## Pyramid pre-opened ## Pyramid pre-opened
self.openpyramidVar = IntVar() key = "openpyramid"
openpyramidCheckbutton = Checkbutton(self, text="Pre-open Pyramid Hole", variable=self.openpyramidVar) self.entrandoWidgets[key] = widgets.make_widget(
openpyramidCheckbutton.pack(anchor=W) self,
"checkbox",
self,
"Pre-open Pyramid Hole",
None
)
self.entrandoWidgets[key].pack(anchor=W)
## Shuffle Ganon ## Shuffle Ganon
self.shuffleGanonVar = IntVar() key = "shuffleganon"
self.shuffleGanonVar.set(1) #set default self.entrandoWidgets[key] = widgets.make_widget(
shuffleGanonCheckbutton = Checkbutton(self, text="Include Ganon's Tower and Pyramid Hole in shuffle pool", variable=self.shuffleGanonVar) self,
shuffleGanonCheckbutton.pack(anchor=W) "checkbox",
self,
"Include Ganon's Tower and Pyramid Hole in shuffle pool",
{"default": 1}
)
self.entrandoWidgets[key].pack(anchor=W)
## Entrance Shuffle ## Entrance Shuffle
shuffleFrame = Frame(self) key = "entranceshuffle"
self.shuffleVar = StringVar() self.entrandoWidgets[key] = widgets.make_widget(
self.shuffleVar.set('vanilla') self,
shuffleOptionMenu = OptionMenu(shuffleFrame, self.shuffleVar, 'vanilla', 'simple', 'restricted', 'full', 'crossed', 'insanity', 'restricted_legacy', 'full_legacy', 'madness_legacy', 'insanity_legacy', 'dungeonsfull', 'dungeonssimple') "selectbox",
shuffleOptionMenu.pack(side=RIGHT) self,
shuffleLabel = Label(shuffleFrame, text='Entrance shuffle algorithm') "Entrance Shuffle",
shuffleLabel.pack(side=LEFT) None,
shuffleFrame.pack(anchor=W) {"label": {"side": LEFT}, "selectbox": {"side": RIGHT}},
{
"Vanilla": "vanilla",
"Simple": "simple",
"Restricted": "restricted",
"Full": "full",
"Crossed": "crossed",
"Insanity": "insanity",
"Restricted (Legacy)": "restricted_legacy",
"Full (Legacy)": "full_legacy",
"Madness (Legacy)": "madness_legacy",
"Insanity (Legacy)": "insanity_legacy",
"Dungeons + Full": "dungeonsfull",
"Dungeons + Simple": "dungeonssimple"
}
)
self.entrandoWidgets[key].pack(anchor=W)
return self return self

View File

@@ -6,17 +6,18 @@ def item_page(parent):
self = ttk.Frame(parent) self = ttk.Frame(parent)
# Item Randomizer options # Item Randomizer options
## Retro (eventually needs to become a World State)
self.itemWidgets = {} self.itemWidgets = {}
self.itemWidgets["retro"] = widgets.make_widget( ## Retro (eventually needs to become a World State)
key = "retro"
self.itemWidgets[key] = widgets.make_widget(
self, self,
"checkbox", "checkbox",
self, self,
"Retro mode (universal keys)", "Retro mode (universal keys)",
None None
) )
self.itemWidgets["retro"].pack(anchor=W) self.itemWidgets[key].pack(anchor=W)
leftItemFrame = Frame(self) leftItemFrame = Frame(self)
rightItemFrame = Frame(self) rightItemFrame = Frame(self)
@@ -24,7 +25,7 @@ def item_page(parent):
rightItemFrame.pack(side=RIGHT) rightItemFrame.pack(side=RIGHT)
## World State ## World State
key = "worldState" key = "worldstate"
self.itemWidgets[key] = widgets.make_widget( self.itemWidgets[key] = widgets.make_widget(
self, self,
"selectbox", "selectbox",
@@ -41,7 +42,7 @@ def item_page(parent):
self.itemWidgets[key].pack(anchor=E) self.itemWidgets[key].pack(anchor=E)
## Logic Level ## Logic Level
key = "logicLevel" key = "logiclevel"
self.itemWidgets[key] = widgets.make_widget( self.itemWidgets[key] = widgets.make_widget(
self, self,
"selectbox", "selectbox",