Re-vamp multiple settings as buttons.

Minor logic clean up.
This commit is contained in:
aerinon
2023-04-06 11:22:12 -06:00
parent abb11558d8
commit 3c18dc6e3a
8 changed files with 85 additions and 57 deletions

View File

@@ -57,7 +57,10 @@ def loadcliargs(gui, args, settings=None):
pagewidgets[widget].selectbox.options = theseOptions
elif thisType == "spinbox":
pagewidgets[widget].label.configure(text=label)
pagewidgets[widget].storageVar.set(args[arg])
elif thisType == 'button':
pagewidgets[widget].button.configure(text=label)
if hasattr(pagewidgets[widget], 'storageVar'):
pagewidgets[widget].storageVar.set(args[arg])
# If we're on the Game Options page and it's not about Hints
if subpage == "gameoptions" and widget not in ["hints", "collection_rate"]:
# Check if we've got settings