From 650911c826d821051f64bd8c41f1f1eb3ac90020 Mon Sep 17 00:00:00 2001 From: "Mike A. Trethewey" Date: Sun, 16 Feb 2020 02:39:26 -0800 Subject: [PATCH] Dictify Multiworld options --- gui/randomize/multiworld.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/gui/randomize/multiworld.py b/gui/randomize/multiworld.py index 22b4a161..4612b852 100644 --- a/gui/randomize/multiworld.py +++ b/gui/randomize/multiworld.py @@ -8,17 +8,23 @@ def multiworld_page(parent,settings): # Multiworld options self.widgets = {} - ## Number of Worlds - key = "worlds" - self.widgets[key] = widgets.make_widget( - self, - "spinbox", - self, - "Worlds", - None, - {"label": {"side": LEFT}, "spinbox": {"side": RIGHT}} - ) - self.widgets[key].pack(side=LEFT, anchor=N) + myDict = { + ## Number of worlds + "worlds": { + "type": "spinbox", + "label": { + "text": "Worlds" + }, + "packAttrs": { + "label": { "side": LEFT }, + "spinbox": { "side": RIGHT } + } + } + } + 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 key = "names"