Standardize Entrando options

Was basically already condensed
This commit is contained in:
Mike A. Trethewey
2020-02-22 00:47:34 -08:00
parent 2f93bcca9c
commit ad49e2cff7
2 changed files with 44 additions and 38 deletions

View File

@@ -15,11 +15,15 @@ def entrando_page(parent):
self.frames["widgets"] = Frame(self) self.frames["widgets"] = Frame(self)
self.frames["widgets"].pack(anchor=W) self.frames["widgets"].pack(anchor=W)
with open(os.path.join("resources","app","gui","randomize","entrando","widgets.json")) as myWidgets: with open(os.path.join("resources","app","gui","randomize","entrando","widgets.json")) as widgetDefns:
myDict = json.load(myWidgets) myDict = json.load(widgetDefns)
dictWidgets = widgets.make_widgets_from_dict(self, myDict, self.frames["widgets"]) for framename,theseWidgets in myDict.items():
for key in dictWidgets: dictWidgets = widgets.make_widgets_from_dict(self, theseWidgets, self.frames[framename])
self.widgets[key] = dictWidgets[key] for key in dictWidgets:
self.widgets[key].pack(anchor=W) self.widgets[key] = dictWidgets[key]
packAttrs = {"anchor":E}
if self.widgets[key].type == "checkbox":
packAttrs["anchor"] = W
self.widgets[key].pack(packAttrs)
return self return self

View File

@@ -1,38 +1,40 @@
{ {
"openpyramid": { "widgets": {
"type": "checkbox", "openpyramid": {
"label": { "type": "checkbox",
"text": "Pre-open Pyramid Hole" "label": {
} "text": "Pre-open Pyramid Hole"
}, }
"shuffleganon": {
"type": "checkbox",
"label": {
"text": "Include Ganon's Tower and Pyramid Hole in shuffle pool"
}
},
"entranceshuffle": {
"type": "selectbox",
"label": {
"text": "Entrance Shuffle"
}, },
"managerAttrs": { "shuffleganon": {
"label": { "side": "left" }, "type": "checkbox",
"selectbox": { "side": "right" } "label": {
"text": "Include Ganon's Tower and Pyramid Hole in shuffle pool"
}
}, },
"options": { "entranceshuffle": {
"Vanilla": "vanilla", "type": "selectbox",
"Simple": "simple", "label": {
"Restricted": "restricted", "text": "Entrance Shuffle"
"Full": "full", },
"Crossed": "crossed", "managerAttrs": {
"Insanity": "insanity", "label": { "side": "left" },
"Restricted (Legacy)": "restricted_legacy", "selectbox": { "side": "right" }
"Full (Legacy)": "full_legacy", },
"Madness (Legacy)": "madness_legacy", "options": {
"Insanity (Legacy)": "insanity_legacy", "Vanilla": "vanilla",
"Dungeons + Full": "dungeonsfull", "Simple": "simple",
"Dungeons + Simple": "dungeonssimple" "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"
}
} }
} }
} }