Dictify Adjust options
This commit is contained in:
@@ -13,27 +13,26 @@ def adjust_page(top, parent, settings):
|
|||||||
# Adjust options
|
# Adjust options
|
||||||
self.widgets = {}
|
self.widgets = {}
|
||||||
|
|
||||||
# Disable BGM
|
myDict = {
|
||||||
key = "nobgm"
|
## Disable BGM
|
||||||
self.widgets[key] = widgets.make_widget(
|
"nobgm": {
|
||||||
self,
|
"type": "checkbox",
|
||||||
"checkbox",
|
"label": {
|
||||||
self,
|
"text": "Disable Music & MSU-1"
|
||||||
"Disable Music & MSU-1",
|
}
|
||||||
None
|
},
|
||||||
)
|
## L/R Quickswap
|
||||||
self.widgets[key].pack(anchor=W)
|
"quickswap": {
|
||||||
|
"type": "checkbox",
|
||||||
# L/R Quickswap
|
"label": {
|
||||||
key = "quickswap"
|
"text": "L/R Quickswapping"
|
||||||
self.widgets[key] = widgets.make_widget(
|
}
|
||||||
self,
|
}
|
||||||
"checkbox",
|
}
|
||||||
self,
|
dictWidgets = widgets.make_widgets_from_dict(self, myDict, self)
|
||||||
"L/R Quickswapping",
|
for key in dictWidgets:
|
||||||
None
|
self.widgets[key] = dictWidgets[key]
|
||||||
)
|
self.widgets[key].pack(anchor=W)
|
||||||
self.widgets[key].pack(anchor=W)
|
|
||||||
|
|
||||||
selectOptionsFrame = Frame(self)
|
selectOptionsFrame = Frame(self)
|
||||||
leftAdjustFrame = Frame(selectOptionsFrame)
|
leftAdjustFrame = Frame(selectOptionsFrame)
|
||||||
@@ -44,43 +43,49 @@ def adjust_page(top, parent, settings):
|
|||||||
rightAdjustFrame.pack(side=RIGHT)
|
rightAdjustFrame.pack(side=RIGHT)
|
||||||
bottomAdjustFrame.pack(fill=X, expand=True)
|
bottomAdjustFrame.pack(fill=X, expand=True)
|
||||||
|
|
||||||
## Heart Color
|
myDict = {
|
||||||
key = "heartcolor"
|
## Heart Color
|
||||||
self.widgets[key] = widgets.make_widget(
|
"heartcolor": {
|
||||||
self,
|
"type": "selectbox",
|
||||||
"selectbox",
|
"label": {
|
||||||
leftAdjustFrame,
|
"text": "Heart Color"
|
||||||
"Heart Color",
|
},
|
||||||
None,
|
"packAttrs": {
|
||||||
{"label": {"side": LEFT}, "selectbox": {"side": RIGHT}},
|
"label": { "side": LEFT },
|
||||||
{
|
"selectbox": { "side": RIGHT }
|
||||||
"Red": "red",
|
},
|
||||||
"Blue": "blue",
|
"options": {
|
||||||
"Green": "green",
|
"Red": "red",
|
||||||
"Yellow": "yellow",
|
"Blue": "blue",
|
||||||
"Random": "random"
|
"Green": "green",
|
||||||
|
"Yellow": "yellow",
|
||||||
|
"Random": "random"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
## Heart Beep speed
|
||||||
|
"heartbeep": {
|
||||||
|
"type": "selectbox",
|
||||||
|
"label": {
|
||||||
|
"text": "Heart Beep sound rate"
|
||||||
|
},
|
||||||
|
"packAttrs": {
|
||||||
|
"label": { "side": LEFT },
|
||||||
|
"selectbox": { "side": RIGHT},
|
||||||
|
"default": "Normal"
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"Double": "double",
|
||||||
|
"Normal": "normal",
|
||||||
|
"Half": "half",
|
||||||
|
"Quarter": "quarter",
|
||||||
|
"Off": "off"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
self.widgets[key].pack(anchor=E)
|
dictWidgets = widgets.make_widgets_from_dict(self, myDict, leftAdjustFrame)
|
||||||
|
for key in dictWidgets:
|
||||||
## Heart Beep Speed
|
self.widgets[key] = dictWidgets[key]
|
||||||
key = "heartbeep"
|
self.widgets[key].pack(anchor=E)
|
||||||
self.widgets[key] = widgets.make_widget(
|
|
||||||
self,
|
|
||||||
"selectbox",
|
|
||||||
leftAdjustFrame,
|
|
||||||
"Heart Beep sound rate",
|
|
||||||
None,
|
|
||||||
{"label": {"side": LEFT}, "selectbox": {"side": RIGHT}, "default": "Normal"},
|
|
||||||
{
|
|
||||||
"Double": "double",
|
|
||||||
"Normal": "normal",
|
|
||||||
"Half": "half",
|
|
||||||
"Quarter": "quarter",
|
|
||||||
"Off": "off"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
self.widgets[key].pack(anchor=W)
|
|
||||||
|
|
||||||
# Sprite Selection
|
# Sprite Selection
|
||||||
self.spriteNameVar2 = StringVar()
|
self.spriteNameVar2 = StringVar()
|
||||||
@@ -108,59 +113,64 @@ def adjust_page(top, parent, settings):
|
|||||||
spriteSelectButton2.pack(side=LEFT)
|
spriteSelectButton2.pack(side=LEFT)
|
||||||
spriteDialogFrame2.pack(anchor=E)
|
spriteDialogFrame2.pack(anchor=E)
|
||||||
|
|
||||||
# Menu Speed
|
myDict = {
|
||||||
key = "menuspeed"
|
## Menu Speed
|
||||||
self.widgets[key] = widgets.make_widget(
|
"menuspeed": {
|
||||||
self,
|
"type": "selectbox",
|
||||||
"selectbox",
|
"label": {
|
||||||
rightAdjustFrame,
|
"text": "Menu Speed"
|
||||||
"Menu Speed",
|
},
|
||||||
None,
|
"packAttrs": {
|
||||||
{"label": {"side": LEFT}, "selectbox": {"side": RIGHT}, "default": "Normal"},
|
"label": { "side": LEFT },
|
||||||
{
|
"selectbox": { "side": RIGHT },
|
||||||
"Instant": "instant",
|
"default": "Normal"
|
||||||
"Quadruple": "quadruple",
|
},
|
||||||
"Triple": "triple",
|
"options": {
|
||||||
"Double": "double",
|
"Instant": "instant",
|
||||||
"Normal": "normal",
|
"Quadruple": "quadruple",
|
||||||
"Half": "half"
|
"Triple": "triple",
|
||||||
|
"Double": "double",
|
||||||
|
"Normal": "normal",
|
||||||
|
"Half": "half"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
## Overworld Palettes (not Enemizer)
|
||||||
|
"owpalettes": {
|
||||||
|
"type": "selectbox",
|
||||||
|
"label": {
|
||||||
|
"text": "Overworld Palettes"
|
||||||
|
},
|
||||||
|
"packAttrs": {
|
||||||
|
"label": { "side": LEFT },
|
||||||
|
"selectbox": { "side": RIGHT }
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"Default": "default",
|
||||||
|
"Random": "random",
|
||||||
|
"Blackout": "blackout"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
## Underworld Palettes (not Enemizer)
|
||||||
|
"uwpalettes": {
|
||||||
|
"type": "selectbox",
|
||||||
|
"label": {
|
||||||
|
"text": "Underworld Palettes"
|
||||||
|
},
|
||||||
|
"packAttrs": {
|
||||||
|
"label": { "side": LEFT },
|
||||||
|
"selectbox": { "side": RIGHT }
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"Default": "default",
|
||||||
|
"Random": "random",
|
||||||
|
"Blackout": "blackout"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
self.widgets[key].pack(anchor=E)
|
dictWidgets = widgets.make_widgets_from_dict(self, myDict, rightAdjustFrame)
|
||||||
|
for key in dictWidgets:
|
||||||
# Overworld Palettes (not Enemizer)
|
self.widgets[key] = dictWidgets[key]
|
||||||
key = "owpalettes"
|
self.widgets[key].pack(anchor=E)
|
||||||
self.widgets[key] = widgets.make_widget(
|
|
||||||
self,
|
|
||||||
"selectbox",
|
|
||||||
rightAdjustFrame,
|
|
||||||
"Overworld Palettes",
|
|
||||||
None,
|
|
||||||
{"label": {"side": LEFT}, "selectbox": {"side": RIGHT}},
|
|
||||||
{
|
|
||||||
"Default": "default",
|
|
||||||
"Random": "random",
|
|
||||||
"Blackout": "blackout"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
self.widgets[key].pack(anchor=E)
|
|
||||||
|
|
||||||
# Underworld Palettes (not Enemizer)
|
|
||||||
key = "uwpalettes"
|
|
||||||
self.widgets[key] = widgets.make_widget(
|
|
||||||
self,
|
|
||||||
"selectbox",
|
|
||||||
rightAdjustFrame,
|
|
||||||
"Underworld Palettes",
|
|
||||||
None,
|
|
||||||
{"label": {"side": LEFT}, "selectbox": {"side": RIGHT}},
|
|
||||||
{
|
|
||||||
"Default": "default",
|
|
||||||
"Random": "random",
|
|
||||||
"Blackout": "blackout"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
self.widgets[key].pack(anchor=E)
|
|
||||||
|
|
||||||
adjustRomFrame = Frame(bottomAdjustFrame)
|
adjustRomFrame = Frame(bottomAdjustFrame)
|
||||||
adjustRomLabel = Label(adjustRomFrame, text='Rom to adjust: ')
|
adjustRomLabel = Label(adjustRomFrame, text='Rom to adjust: ')
|
||||||
|
|||||||
Reference in New Issue
Block a user