- May 26, 2017
- 838
- 2,810
Hello.
Here is the code I've written:
The "if "persistent.gallery_taboo_{}".format(gallery_customization_taboo[t]):" doesn't work as intended.
It is always on, even when I change the value of the persistent data. And if I add "== True" or "== False" to it, it's always off.
Here is the code I've written:
Code:
init -1:
default gallery_customization_taboo = ["dad", "ashdad", "dough", "evab", "jack", "jasmin", "jes", "nat", "tyrone", "wilson"]
default persistent.gallery_taboo_dad = False
default persistent.gallery_taboo_ashdad = False
default persistent.gallery_taboo_dough = False
default persistent.gallery_taboo_evab = False
default persistent.gallery_taboo_jack = False
default persistent.gallery_taboo_jasmin = False
default persistent.gallery_taboo_jes = False
default persistent.gallery_taboo_nat = False
default persistent.gallery_taboo_tyrone = False
default persistent.gallery_taboo_wilson = False
screen gallery_customization:
frame anchor (0.5,1.0) align (0.50,0.78) padding (5,5) xysize (1200,520):
background Solid("#99d6ff")
vpgrid cols 7 spacing 5:
for t in range(0,len(gallery_customization_taboo)):
frame:
background Frame("JDMOD/system/background_customization.png", left=0, top=0)
button padding (0,0) xysize (143,240):
hover_background Frame("JDMOD/system/character/hovered_{}.png".format(gallery_customization_taboo[t]), left=0, top=0)
if "persistent.gallery_taboo_{}".format(gallery_customization_taboo[t]):
background Frame("JDMOD/system/character/hovered_{}.png".format(gallery_customization_taboo[t]), left=0, top=0)
add Frame("images/{}.png".format(gallery_customization_taboo[t]), left=0, top=0)
clicked ToggleField(persistent, "gallery_taboo_{}".format(gallery_customization_taboo[t]), true_value=None, false_value=None)
It is always on, even when I change the value of the persistent data. And if I add "== True" or "== False" to it, it's always off.