Dictify first column of Custom
This commit is contained in:
@@ -23,140 +23,192 @@ def custom_page(top,parent):
|
|||||||
|
|
||||||
currentList = itemList1
|
currentList = itemList1
|
||||||
|
|
||||||
# Bow
|
myDict = {
|
||||||
key = "bow"
|
# Bow
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
"bow": {
|
||||||
"Bow",
|
"type": "textbox",
|
||||||
None,
|
"label": {
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,53)}, "textbox": {"side": RIGHT}, "default": 0}
|
"text": "Bow"
|
||||||
)
|
},
|
||||||
self.customWidgets[key].pack()
|
"packAttrs": {
|
||||||
|
"label": { "anchor": W, "side": LEFT, "padx": (0,53) },
|
||||||
# Progressive Bow
|
"textbox": { "side": RIGHT },
|
||||||
key = "progressivebow"
|
"default": 0
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
}
|
||||||
"Prog.Bow",
|
},
|
||||||
None,
|
# Progressive Bow
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,25)}, "textbox": {"side": RIGHT}, "default": 2}
|
"progressivebow": {
|
||||||
)
|
"type": "textbox",
|
||||||
self.customWidgets[key].pack()
|
"label": {
|
||||||
|
"text": "Prog.Bow"
|
||||||
# Boomerang
|
},
|
||||||
key = "boomerang"
|
"packAttrs": {
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
"label": { "anchor": W, "side": LEFT, "padx": (0,25) },
|
||||||
"B.Boomerang",
|
"textbox": { "side": RIGHT },
|
||||||
None,
|
"default": 2
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,4)}, "textbox": {"side": RIGHT}, "default": 1}
|
}
|
||||||
)
|
},
|
||||||
self.customWidgets[key].pack()
|
# Boomerang
|
||||||
|
"boomerang": {
|
||||||
# Redmerang
|
"type": "textbox",
|
||||||
key = "redmerang"
|
"label": {
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
"text": "B.Boomerang"
|
||||||
"M.Boomerang",
|
},
|
||||||
None,
|
"packAttrs": {
|
||||||
{"label": {"anchor": W, "side": LEFT}, "textbox": {"side": RIGHT}, "default": 1}
|
"label": { "anchor": W, "side": LEFT, "padx": (0,4) },
|
||||||
)
|
"textbox": { "side": RIGHT },
|
||||||
self.customWidgets[key].pack()
|
"default": 1
|
||||||
|
}
|
||||||
# Hookshot
|
},
|
||||||
key = "hookshot"
|
# Boomerang
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
"redmerang": {
|
||||||
"Hookshot",
|
"type": "textbox",
|
||||||
None,
|
"label": {
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,24)}, "textbox": {"side": RIGHT}, "default": 1}
|
"text": "M.Boomerang"
|
||||||
)
|
},
|
||||||
self.customWidgets[key].pack()
|
"packAttrs": {
|
||||||
|
"label": { "anchor": W, "side": LEFT },
|
||||||
# Mushroom
|
"textbox": { "side": RIGHT },
|
||||||
key = "mushroom"
|
"default": 1
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
}
|
||||||
"Mushroom",
|
},
|
||||||
None,
|
# Hookshot
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,17)}, "textbox": {"side": RIGHT}, "default": 1}
|
"hookshot": {
|
||||||
)
|
"type": "textbox",
|
||||||
self.customWidgets[key].pack()
|
"label": {
|
||||||
|
"text": "Hookshot"
|
||||||
# Powder
|
},
|
||||||
key = "powder"
|
"packAttrs": {
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
"label": { "anchor": W, "side": LEFT, "padx": (0,24) },
|
||||||
"Magic Powder",
|
"textbox": { "side": RIGHT },
|
||||||
None,
|
"default": 1
|
||||||
{"label": {"anchor": W, "side": LEFT}, "textbox": {"side": RIGHT}, "default": 1}
|
}
|
||||||
)
|
},
|
||||||
self.customWidgets[key].pack()
|
# Mushroom
|
||||||
|
"mushroom": {
|
||||||
# Fire Rod
|
"type": "textbox",
|
||||||
key = "firerod"
|
"label": {
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
"text": "Mushroom"
|
||||||
"Fire Rod",
|
},
|
||||||
None,
|
"packAttrs": {
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,33)}, "textbox": {"side": RIGHT}, "default": 1}
|
"label": { "anchor": W, "side": LEFT, "padx": (0,17) },
|
||||||
)
|
"textbox": { "side": RIGHT },
|
||||||
self.customWidgets[key].pack()
|
"default": 1
|
||||||
|
}
|
||||||
# Ice Rod
|
},
|
||||||
key = "icerod"
|
# Powder
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
"powder": {
|
||||||
"Ice Rod",
|
"type": "textbox",
|
||||||
None,
|
"label": {
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,37)}, "textbox": {"side": RIGHT}, "default": 1}
|
"text": "Magic Powder"
|
||||||
)
|
},
|
||||||
self.customWidgets[key].pack()
|
"packAttrs": {
|
||||||
|
"label": { "anchor": W, "side": LEFT },
|
||||||
# Bombos
|
"textbox": { "side": RIGHT },
|
||||||
key = "bombos"
|
"default": 1
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
}
|
||||||
"Bombos",
|
},
|
||||||
None,
|
# Fire Rod
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,32)}, "textbox": {"side": RIGHT}, "default": 1}
|
"firerod": {
|
||||||
)
|
"type": "textbox",
|
||||||
self.customWidgets[key].pack()
|
"label": {
|
||||||
|
"text": "Fire Rod"
|
||||||
# Ether
|
},
|
||||||
key = "ether"
|
"packAttrs": {
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
"label": { "anchor": W, "side": LEFT, "padx": (0,33) },
|
||||||
"Ether",
|
"textbox": { "side": RIGHT },
|
||||||
None,
|
"default": 1
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,49)}, "textbox": {"side": RIGHT}, "default": 1}
|
}
|
||||||
)
|
},
|
||||||
self.customWidgets[key].pack()
|
# Ice Rod
|
||||||
|
"icerod": {
|
||||||
# Quake
|
"type": "textbox",
|
||||||
key = "quake"
|
"label": {
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
"text": "Ice Rod"
|
||||||
"Quake",
|
},
|
||||||
None,
|
"packAttrs": {
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,42)}, "textbox": {"side": RIGHT}, "default": 1}
|
"label": { "anchor": W, "side": LEFT, "padx": (0,37) },
|
||||||
)
|
"textbox": { "side": RIGHT },
|
||||||
self.customWidgets[key].pack()
|
"default": 1
|
||||||
|
}
|
||||||
# Lamp
|
},
|
||||||
key = "lamp"
|
# Bombos
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
"bombos": {
|
||||||
"Lamp",
|
"type": "textbox",
|
||||||
None,
|
"label": {
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,46)}, "textbox": {"side": RIGHT}, "default": 1}
|
"text": "Bombos"
|
||||||
)
|
},
|
||||||
self.customWidgets[key].pack()
|
"packAttrs": {
|
||||||
|
"label": { "anchor": W, "side": LEFT, "padx": (0,32) },
|
||||||
# Hammer
|
"textbox": { "side": RIGHT },
|
||||||
key = "hammer"
|
"default": 1
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
}
|
||||||
"Hammer",
|
},
|
||||||
None,
|
# Ether
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,29)}, "textbox": {"side": RIGHT}, "default": 1}
|
"ether": {
|
||||||
)
|
"type": "textbox",
|
||||||
self.customWidgets[key].pack()
|
"label": {
|
||||||
|
"text": "Ether"
|
||||||
# Shovel
|
},
|
||||||
key = "shovel"
|
"packAttrs": {
|
||||||
self.customWidgets[key] = widgets.make_widget(self,"textbox",currentList,
|
"label": { "anchor": W, "side": LEFT, "padx": (0,49) },
|
||||||
"Shovel",
|
"textbox": { "side": RIGHT },
|
||||||
None,
|
"default": 1
|
||||||
{"label": {"anchor": W, "side": LEFT, "padx": (0,41)}, "textbox": {"side": RIGHT}, "default": 1}
|
}
|
||||||
)
|
},
|
||||||
self.customWidgets[key].pack()
|
# Quake
|
||||||
|
"quake": {
|
||||||
|
"type": "textbox",
|
||||||
|
"label": {
|
||||||
|
"text": "Quake"
|
||||||
|
},
|
||||||
|
"packAttrs": {
|
||||||
|
"label": { "anchor": W, "side": LEFT, "padx": (0,42) },
|
||||||
|
"textbox": { "side": RIGHT },
|
||||||
|
"default": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
# Lamp
|
||||||
|
"lamp": {
|
||||||
|
"type": "textbox",
|
||||||
|
"label": {
|
||||||
|
"text": "Lamp"
|
||||||
|
},
|
||||||
|
"packAttrs": {
|
||||||
|
"label": { "anchor": W, "side": LEFT, "padx": (0,46) },
|
||||||
|
"textbox": { "side": RIGHT },
|
||||||
|
"default": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
# Hammer
|
||||||
|
"hammer": {
|
||||||
|
"type": "textbox",
|
||||||
|
"label": {
|
||||||
|
"text": "Hammer"
|
||||||
|
},
|
||||||
|
"packAttrs": {
|
||||||
|
"label": { "anchor": W, "side": LEFT, "padx": (0,29) },
|
||||||
|
"textbox": { "side": RIGHT },
|
||||||
|
"default": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
# Shovel
|
||||||
|
"shovel": {
|
||||||
|
"type": "textbox",
|
||||||
|
"label": {
|
||||||
|
"text": "Shovel"
|
||||||
|
},
|
||||||
|
"packAttrs": {
|
||||||
|
"label": { "anchor": W, "side": LEFT, "padx": (0,41) },
|
||||||
|
"textbox": { "side": RIGHT },
|
||||||
|
"default": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dictWidgets = widgets.make_widgets_from_dict(self, myDict, currentList)
|
||||||
|
for key in dictWidgets:
|
||||||
|
self.customWidgets[key] = dictWidgets[key]
|
||||||
|
self.customWidgets[key].pack()
|
||||||
|
|
||||||
currentList = itemList2
|
currentList = itemList2
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user