Dictify Multiworld options

This commit is contained in:
Mike A. Trethewey
2020-02-16 02:39:26 -08:00
parent 7298cbfbc0
commit 650911c826

View File

@@ -8,17 +8,23 @@ def multiworld_page(parent,settings):
# Multiworld options # Multiworld options
self.widgets = {} self.widgets = {}
## Number of Worlds myDict = {
key = "worlds" ## Number of worlds
self.widgets[key] = widgets.make_widget( "worlds": {
self, "type": "spinbox",
"spinbox", "label": {
self, "text": "Worlds"
"Worlds", },
None, "packAttrs": {
{"label": {"side": LEFT}, "spinbox": {"side": RIGHT}} "label": { "side": LEFT },
) "spinbox": { "side": RIGHT }
self.widgets[key].pack(side=LEFT, anchor=N) }
}
}
dictWidgets = widgets.make_widgets_from_dict(self, myDict, self)
for key in dictWidgets:
self.widgets[key] = dictWidgets[key]
self.widgets[key].pack(side=LEFT, anchor=N)
## List of Player Names ## List of Player Names
key = "names" key = "names"