Slim down args
This commit is contained in:
4
Utils.py
4
Utils.py
@@ -78,9 +78,7 @@ def output_path(path):
|
|||||||
# True for expanding the tilde into a fully qualified path
|
# True for expanding the tilde into a fully qualified path
|
||||||
documents = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, True)[0]
|
documents = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, True)[0]
|
||||||
elif sys.platform.find("linux") or sys.platform.find("ubuntu") or sys.platform.find("unix"):
|
elif sys.platform.find("linux") or sys.platform.find("ubuntu") or sys.platform.find("unix"):
|
||||||
documents = os.path.expanduser("~")
|
documents = os.path.join(os.path.expanduser("~"),"Documents")
|
||||||
print(documents)
|
|
||||||
documents = os.path.join(documents,"Documents")
|
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError('Not supported yet')
|
raise NotImplementedError('Not supported yet')
|
||||||
|
|
||||||
|
|||||||
@@ -200,12 +200,12 @@
|
|||||||
},
|
},
|
||||||
"shuffleganon": {
|
"shuffleganon": {
|
||||||
"action": "store_true",
|
"action": "store_true",
|
||||||
"type": "bool",
|
"type": "bool"
|
||||||
"help": "suppress"
|
|
||||||
},
|
},
|
||||||
"no-shuffleganon": {
|
"no-shuffleganon": {
|
||||||
"action": "store_false",
|
"action": "store_false",
|
||||||
"dest": "shuffleganon"
|
"dest": "shuffleganon",
|
||||||
|
"help": "suppress"
|
||||||
},
|
},
|
||||||
"heartbeep": {
|
"heartbeep": {
|
||||||
"choices": [
|
"choices": [
|
||||||
|
|||||||
@@ -246,9 +246,9 @@
|
|||||||
"None: You will be able to reach enough locations to beat the game."
|
"None: You will be able to reach enough locations to beat the game."
|
||||||
],
|
],
|
||||||
"hints": [ "Make telepathic tiles and storytellers give helpful hints. (default: %(default)s)" ],
|
"hints": [ "Make telepathic tiles and storytellers give helpful hints. (default: %(default)s)" ],
|
||||||
"no-shuffleganon": [
|
"shuffleganon": [
|
||||||
"If set, the Pyramid Hole and Ganon's Tower are not",
|
"Include the Ganon's Tower and Pyramid Hole in the",
|
||||||
"included entrance shuffle pool. (default: %(default)s)"
|
"entrance shuffle pool. (default: %(default)s)"
|
||||||
],
|
],
|
||||||
"heartbeep": [
|
"heartbeep": [
|
||||||
"Select the rate at which the heart beep sound is played at",
|
"Select the rate at which the heart beep sound is played at",
|
||||||
|
|||||||
@@ -1,26 +1,6 @@
|
|||||||
{
|
{
|
||||||
"mapshuffle": {
|
"mapshuffle": { "type": "checkbox" },
|
||||||
"type": "checkbox",
|
"compassshuffle": { "type": "checkbox" },
|
||||||
"label": {
|
"smallkeyshuffle": { "type": "checkbox" },
|
||||||
"text": "Maps"
|
"bigkeyshuffle": { "type": "checkbox" }
|
||||||
}
|
|
||||||
},
|
|
||||||
"compassshuffle": {
|
|
||||||
"type": "checkbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Compasses"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"smallkeyshuffle": {
|
|
||||||
"type": "checkbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Small Keys"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bigkeyshuffle": {
|
|
||||||
"type": "checkbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Big Keys"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,7 @@
|
|||||||
{
|
{
|
||||||
"dungeondoorshuffle": {
|
"dungeondoorshuffle": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Dungeon Door Shuffle"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
"managerAttrs": {
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
},
|
|
||||||
"default": "basic"
|
"default": "basic"
|
||||||
},
|
},
|
||||||
"options": [
|
"options": [
|
||||||
@@ -19,24 +10,10 @@
|
|||||||
"crossed"
|
"crossed"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"experimental": {
|
"experimental": { "type": "checkbox" },
|
||||||
"type": "checkbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Enable Experimental Features"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dungeon_counters": {
|
"dungeon_counters": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Dungeon Chest Counters"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
"managerAttrs": {
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
},
|
|
||||||
"default": "default"
|
"default": "default"
|
||||||
},
|
},
|
||||||
"options": [
|
"options": [
|
||||||
|
|||||||
@@ -1,26 +1,10 @@
|
|||||||
{
|
{
|
||||||
"checkboxes": {
|
"checkboxes": {
|
||||||
"potshuffle": {
|
"potshuffle": { "type": "checkbox" }
|
||||||
"type": "checkbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Pot Shuffle"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"leftEnemizerFrame": {
|
"leftEnemizerFrame": {
|
||||||
"enemyshuffle": {
|
"enemyshuffle": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Enemy Shuffle"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"none",
|
"none",
|
||||||
"shuffled",
|
"shuffled",
|
||||||
@@ -29,17 +13,6 @@
|
|||||||
},
|
},
|
||||||
"bossshuffle": {
|
"bossshuffle": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Boss Shuffle"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"none",
|
"none",
|
||||||
"basic",
|
"basic",
|
||||||
@@ -51,17 +24,6 @@
|
|||||||
"rightEnemizerFrame": {
|
"rightEnemizerFrame": {
|
||||||
"enemydamage": {
|
"enemydamage": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Enemy Damage"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"default",
|
"default",
|
||||||
"shuffled",
|
"shuffled",
|
||||||
@@ -70,17 +32,6 @@
|
|||||||
},
|
},
|
||||||
"enemyhealth": {
|
"enemyhealth": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Enemy Health"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"default",
|
"default",
|
||||||
"easy",
|
"easy",
|
||||||
@@ -90,4 +41,4 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,9 @@
|
|||||||
{
|
{
|
||||||
"widgets": {
|
"widgets": {
|
||||||
"openpyramid": {
|
"openpyramid": { "type": "checkbox" },
|
||||||
"type": "checkbox",
|
"shuffleganon": { "type": "checkbox" },
|
||||||
"label": {
|
"entranceshuffle": {
|
||||||
"text": "Pre-open Pyramid Hole"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"shuffleganon": {
|
|
||||||
"type": "checkbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Include Ganon's Tower and Pyramid Hole in shuffle pool"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"entranceshuffle": {
|
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Entrance Shuffle"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": { "side": "left" },
|
|
||||||
"selectbox": { "side": "right" }
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"vanilla",
|
"vanilla",
|
||||||
"simple",
|
"simple",
|
||||||
|
|||||||
@@ -1,39 +1,15 @@
|
|||||||
{
|
{
|
||||||
"checkboxes": {
|
"checkboxes": {
|
||||||
"hints": {
|
"hints": {
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"label": {
|
|
||||||
"text": "Include Helpful Hints"
|
|
||||||
},
|
|
||||||
"default": "true"
|
"default": "true"
|
||||||
},
|
},
|
||||||
"nobgm": {
|
"nobgm": { "type": "checkbox" },
|
||||||
"type": "checkbox",
|
"quickswap": { "type": "checkbox" }
|
||||||
"label": {
|
|
||||||
"text": "Disable Music & MSU-1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"quickswap": {
|
|
||||||
"type": "checkbox",
|
|
||||||
"label": {
|
|
||||||
"text": "L/R Quickswapping"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"leftRomOptionsFrame": {
|
"leftRomOptionsFrame": {
|
||||||
"heartcolor": {
|
"heartcolor": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Heart Color"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"red",
|
"red",
|
||||||
"blue",
|
"blue",
|
||||||
@@ -44,16 +20,7 @@
|
|||||||
},
|
},
|
||||||
"heartbeep": {
|
"heartbeep": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Heart Beep sound rate"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
"managerAttrs": {
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
},
|
|
||||||
"default": "normal"
|
"default": "normal"
|
||||||
},
|
},
|
||||||
"options": [
|
"options": [
|
||||||
@@ -68,16 +35,7 @@
|
|||||||
"rightRomOptionsFrame": {
|
"rightRomOptionsFrame": {
|
||||||
"menuspeed": {
|
"menuspeed": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Menu Speed"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
"managerAttrs": {
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
},
|
|
||||||
"default": "normal"
|
"default": "normal"
|
||||||
},
|
},
|
||||||
"options": [
|
"options": [
|
||||||
@@ -91,17 +49,6 @@
|
|||||||
},
|
},
|
||||||
"owpalettes": {
|
"owpalettes": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Overworld Palettes"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"default",
|
"default",
|
||||||
"random",
|
"random",
|
||||||
@@ -110,17 +57,6 @@
|
|||||||
},
|
},
|
||||||
"uwpalettes": {
|
"uwpalettes": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Underworld Palettes"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"default",
|
"default",
|
||||||
"random",
|
"random",
|
||||||
|
|||||||
@@ -1,45 +1,6 @@
|
|||||||
{
|
{
|
||||||
"spoiler": {
|
"spoiler": { "type": "checkbox" },
|
||||||
"type": "checkbox",
|
"suppressrom": { "type": "checkbox" },
|
||||||
"label": {
|
"usestartinventory": { "type": "checkbox" },
|
||||||
"text": "Create Spoiler Log"
|
"usecustompool": { "type": "checkbox" }
|
||||||
}
|
|
||||||
},
|
|
||||||
"suppressrom": {
|
|
||||||
"type": "checkbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Do not create patched ROM"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"usestartinventory": {
|
|
||||||
"type": "checkbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Use starting inventory"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"usecustompool": {
|
|
||||||
"type": "checkbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Use custom item pool"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"saveonexit": {
|
|
||||||
"type": "selectbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Save Settings on Exit"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
|
||||||
"ask",
|
|
||||||
"always",
|
|
||||||
"never"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
10
resources/app/gui/randomize/generation/widgets.json
Normal file
10
resources/app/gui/randomize/generation/widgets.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"saveonexit": {
|
||||||
|
"type": "selectbox",
|
||||||
|
"options": [
|
||||||
|
"ask",
|
||||||
|
"always",
|
||||||
|
"never"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,25 +1,11 @@
|
|||||||
{
|
{
|
||||||
"checkboxes": {
|
"checkboxes": {
|
||||||
"retro": {
|
"retro": { "type": "checkbox" }
|
||||||
"type": "checkbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Retro mode (universal keys)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"leftItemFrame": {
|
"leftItemFrame": {
|
||||||
"worldstate": {
|
"worldstate": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "World State"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
"managerAttrs": {
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
},
|
|
||||||
"default": "open"
|
"default": "open"
|
||||||
},
|
},
|
||||||
"options": [
|
"options": [
|
||||||
@@ -31,17 +17,6 @@
|
|||||||
},
|
},
|
||||||
"logiclevel": {
|
"logiclevel": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Logic Level"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"noglitches",
|
"noglitches",
|
||||||
"minorglitches",
|
"minorglitches",
|
||||||
@@ -50,17 +25,6 @@
|
|||||||
},
|
},
|
||||||
"goal": {
|
"goal": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Goal"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"ganon",
|
"ganon",
|
||||||
"pedestal",
|
"pedestal",
|
||||||
@@ -71,67 +35,20 @@
|
|||||||
},
|
},
|
||||||
"crystals_gt": {
|
"crystals_gt": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Crystals to open GT"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"0",
|
0, 1, 2, 3, 4, 5, 6, 7,
|
||||||
"1",
|
|
||||||
"2",
|
|
||||||
"3",
|
|
||||||
"4",
|
|
||||||
"5",
|
|
||||||
"6",
|
|
||||||
"7",
|
|
||||||
"random"
|
"random"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"crystals_ganon": {
|
"crystals_ganon": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Crystals to harm Ganon"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"0",
|
0, 1, 2, 3, 4, 5, 6, 7,
|
||||||
"1",
|
|
||||||
"2",
|
|
||||||
"3",
|
|
||||||
"4",
|
|
||||||
"5",
|
|
||||||
"6",
|
|
||||||
"7",
|
|
||||||
"random"
|
"random"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"weapons": {
|
"weapons": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Weapons"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"random",
|
"random",
|
||||||
"assured",
|
"assured",
|
||||||
@@ -143,17 +60,6 @@
|
|||||||
"rightItemFrame": {
|
"rightItemFrame": {
|
||||||
"itempool": {
|
"itempool": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Item Pool"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"normal",
|
"normal",
|
||||||
"hard",
|
"hard",
|
||||||
@@ -162,17 +68,6 @@
|
|||||||
},
|
},
|
||||||
"itemfunction": {
|
"itemfunction": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Item Functionality"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"normal",
|
"normal",
|
||||||
"hard",
|
"hard",
|
||||||
@@ -181,17 +76,6 @@
|
|||||||
},
|
},
|
||||||
"timer": {
|
"timer": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Timer Setting"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"none",
|
"none",
|
||||||
"display",
|
"display",
|
||||||
@@ -203,17 +87,6 @@
|
|||||||
},
|
},
|
||||||
"progressives": {
|
"progressives": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Progressive Items"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"on",
|
"on",
|
||||||
"off",
|
"off",
|
||||||
@@ -222,17 +95,6 @@
|
|||||||
},
|
},
|
||||||
"accessibility": {
|
"accessibility": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Accessibility"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": [
|
"options": [
|
||||||
"items",
|
"items",
|
||||||
"locations",
|
"locations",
|
||||||
@@ -241,16 +103,7 @@
|
|||||||
},
|
},
|
||||||
"sortingalgo": {
|
"sortingalgo": {
|
||||||
"type": "selectbox",
|
"type": "selectbox",
|
||||||
"label": {
|
|
||||||
"text": "Item Sorting"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
"managerAttrs": {
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"selectbox": {
|
|
||||||
"side": "right"
|
|
||||||
},
|
|
||||||
"default": "balanced"
|
"default": "balanced"
|
||||||
},
|
},
|
||||||
"options": [
|
"options": [
|
||||||
|
|||||||
@@ -1,16 +1,3 @@
|
|||||||
{
|
{
|
||||||
"worlds": {
|
"worlds": { "type": "spinbox" }
|
||||||
"type": "spinbox",
|
|
||||||
"label": {
|
|
||||||
"text": "Worlds"
|
|
||||||
},
|
|
||||||
"managerAttrs": {
|
|
||||||
"label": {
|
|
||||||
"side": "left"
|
|
||||||
},
|
|
||||||
"spinbox": {
|
|
||||||
"side": "right"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ def loadcliargs(gui, args, settings=None):
|
|||||||
gui.pages[mainpage].pages[subpage].widgets[widget].label.configure(text=label)
|
gui.pages[mainpage].pages[subpage].widgets[widget].label.configure(text=label)
|
||||||
i = 0
|
i = 0
|
||||||
for value in theseOptions["values"]:
|
for value in theseOptions["values"]:
|
||||||
gui.pages[mainpage].pages[subpage].widgets[widget].selectbox.options["labels"][i] = fish.translate("gui","gui",mainpage + '.' + subpage + '.' + widget + '.' + value)
|
gui.pages[mainpage].pages[subpage].widgets[widget].selectbox.options["labels"][i] = fish.translate("gui","gui",mainpage + '.' + subpage + '.' + widget + '.' + str(value))
|
||||||
i += 1
|
i += 1
|
||||||
for i in range(0, len(theseOptions["values"])):
|
for i in range(0, len(theseOptions["values"])):
|
||||||
gui.pages[mainpage].pages[subpage].widgets[widget].selectbox["menu"].entryconfigure(i, label=theseOptions["labels"][i])
|
gui.pages[mainpage].pages[subpage].widgets[widget].selectbox["menu"].entryconfigure(i, label=theseOptions["labels"][i])
|
||||||
|
|||||||
@@ -25,6 +25,17 @@ def generation_page(parent,settings):
|
|||||||
self.widgets[key] = dictWidgets[key]
|
self.widgets[key] = dictWidgets[key]
|
||||||
self.widgets[key].pack(anchor=W)
|
self.widgets[key].pack(anchor=W)
|
||||||
|
|
||||||
|
self.frames["widgets"] = Frame(self)
|
||||||
|
self.frames["widgets"].pack(anchor=W)
|
||||||
|
# Load Generation Setup option widgets as defined by JSON file
|
||||||
|
# Defns include frame name, widget type, widget options, widget placement attributes
|
||||||
|
with open(os.path.join("resources","app","gui","randomize","generation","widgets.json")) as items:
|
||||||
|
myDict = json.load(items)
|
||||||
|
dictWidgets = widgets.make_widgets_from_dict(self, myDict, self.frames["widgets"])
|
||||||
|
for key in dictWidgets:
|
||||||
|
self.widgets[key] = dictWidgets[key]
|
||||||
|
self.widgets[key].pack(anchor=W)
|
||||||
|
|
||||||
self.frames["baserom"] = Frame(self)
|
self.frames["baserom"] = Frame(self)
|
||||||
self.frames["baserom"].pack(anchor=W, fill=X)
|
self.frames["baserom"].pack(anchor=W, fill=X)
|
||||||
## Locate base ROM
|
## Locate base ROM
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from tkinter import Checkbutton, Entry, Frame, IntVar, Label, OptionMenu, Spinbox, StringVar, RIGHT, X
|
from tkinter import Checkbutton, Entry, Frame, IntVar, Label, OptionMenu, Spinbox, StringVar, LEFT, RIGHT, X
|
||||||
from source.classes.Empty import Empty
|
from source.classes.Empty import Empty
|
||||||
|
|
||||||
# Override Spinbox to include mousewheel support for changing value
|
# Override Spinbox to include mousewheel support for changing value
|
||||||
@@ -17,9 +17,9 @@ class mySpinbox(Spinbox):
|
|||||||
|
|
||||||
# Make a Checkbutton with a label
|
# Make a Checkbutton with a label
|
||||||
def make_checkbox(self, parent, label, storageVar, manager, managerAttrs):
|
def make_checkbox(self, parent, label, storageVar, manager, managerAttrs):
|
||||||
self = Frame(parent, name="checkframe-" + label.lower())
|
self = Frame(parent)
|
||||||
self.storageVar = storageVar
|
self.storageVar = storageVar
|
||||||
self.checkbox = Checkbutton(self, text=label, variable=self.storageVar, name="checkbox-" + label.lower())
|
self.checkbox = Checkbutton(self, text=label, variable=self.storageVar)
|
||||||
if managerAttrs is not None:
|
if managerAttrs is not None:
|
||||||
self.checkbox.pack(managerAttrs)
|
self.checkbox.pack(managerAttrs)
|
||||||
else:
|
else:
|
||||||
@@ -28,7 +28,7 @@ def make_checkbox(self, parent, label, storageVar, manager, managerAttrs):
|
|||||||
|
|
||||||
# Make an OptionMenu with a label and pretty option labels
|
# Make an OptionMenu with a label and pretty option labels
|
||||||
def make_selectbox(self, parent, label, options, storageVar, manager, managerAttrs):
|
def make_selectbox(self, parent, label, options, storageVar, manager, managerAttrs):
|
||||||
self = Frame(parent, name="selectframe-" + label.lower())
|
self = Frame(parent)
|
||||||
|
|
||||||
labels = options
|
labels = options
|
||||||
|
|
||||||
@@ -88,48 +88,49 @@ def make_selectbox(self, parent, label, options, storageVar, manager, managerAtt
|
|||||||
if managerAttrs is not None and "label" in managerAttrs:
|
if managerAttrs is not None and "label" in managerAttrs:
|
||||||
self.label.pack(managerAttrs["label"])
|
self.label.pack(managerAttrs["label"])
|
||||||
else:
|
else:
|
||||||
self.label.pack()
|
self.label.pack(side=LEFT)
|
||||||
|
|
||||||
self.selectbox.config(width=20)
|
self.selectbox.config(width=20)
|
||||||
idx = 0
|
idx = 0
|
||||||
default = self.selectbox.options["values"][idx]
|
default = self.selectbox.options["values"][idx]
|
||||||
if "default" in managerAttrs:
|
if managerAttrs is not None and "default" in managerAttrs:
|
||||||
default = managerAttrs["default"]
|
default = managerAttrs["default"]
|
||||||
labels = self.selectbox.options["labels"]
|
labels = self.selectbox.options["labels"]
|
||||||
values = self.selectbox.options["values"]
|
values = self.selectbox.options["values"]
|
||||||
if default in values:
|
if default in values:
|
||||||
idx = values.index(default)
|
idx = values.index(default)
|
||||||
self.labelVar.set(labels[idx])
|
if not labels[idx] == "":
|
||||||
|
self.labelVar.set(labels[idx])
|
||||||
|
self.selectbox["menu"].entryconfigure(idx,label=labels[idx])
|
||||||
self.storageVar.set(values[idx])
|
self.storageVar.set(values[idx])
|
||||||
self.selectbox["menu"].entryconfigure(idx,label=labels[idx])
|
|
||||||
|
|
||||||
if managerAttrs is not None and "selectbox" in managerAttrs:
|
if managerAttrs is not None and "selectbox" in managerAttrs:
|
||||||
self.selectbox.pack(managerAttrs["selectbox"])
|
self.selectbox.pack(managerAttrs["selectbox"])
|
||||||
else:
|
else:
|
||||||
self.selectbox.pack()
|
self.selectbox.pack(side=RIGHT)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
# Make a Spinbox with a label, limit 1-100
|
# Make a Spinbox with a label, limit 1-100
|
||||||
def make_spinbox(self, parent, label, storageVar, manager, managerAttrs):
|
def make_spinbox(self, parent, label, storageVar, manager, managerAttrs):
|
||||||
self = Frame(parent, name="spinframe-" + label.lower())
|
self = Frame(parent)
|
||||||
self.storageVar = storageVar
|
self.storageVar = storageVar
|
||||||
self.label = Label(self, text=label)
|
self.label = Label(self, text=label)
|
||||||
if managerAttrs is not None and "label" in managerAttrs:
|
if managerAttrs is not None and "label" in managerAttrs:
|
||||||
self.label.pack(managerAttrs["label"])
|
self.label.pack(managerAttrs["label"])
|
||||||
else:
|
else:
|
||||||
self.label.pack()
|
self.label.pack(side=LEFT)
|
||||||
fromNum = 1
|
fromNum = 1
|
||||||
toNum = 100
|
toNum = 100
|
||||||
if "spinbox" in managerAttrs:
|
if managerAttrs is not None and "spinbox" in managerAttrs:
|
||||||
if "from" in managerAttrs:
|
if "from" in managerAttrs:
|
||||||
fromNum = managerAttrs["spinbox"]["from"]
|
fromNum = managerAttrs["spinbox"]["from"]
|
||||||
if "to" in managerAttrs:
|
if "to" in managerAttrs:
|
||||||
toNum = managerAttrs["spinbox"]["to"]
|
toNum = managerAttrs["spinbox"]["to"]
|
||||||
self.spinbox = mySpinbox(self, from_=fromNum, to=toNum, width=5, textvariable=self.storageVar, name="spinbox-" + label.lower())
|
self.spinbox = mySpinbox(self, from_=fromNum, to=toNum, width=5, textvariable=self.storageVar)
|
||||||
if managerAttrs is not None and "spinbox" in managerAttrs:
|
if managerAttrs is not None and "spinbox" in managerAttrs:
|
||||||
self.spinbox.pack(managerAttrs["spinbox"])
|
self.spinbox.pack(managerAttrs["spinbox"])
|
||||||
else:
|
else:
|
||||||
self.spinbox.pack()
|
self.spinbox.pack(side=RIGHT)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
# Make an Entry box with a label
|
# Make an Entry box with a label
|
||||||
|
|||||||
Reference in New Issue
Block a user