I have a problem and I can't figure out how to fix it... I created a gallery where images are locked in the first place and then unlocked after you discover them. I figured out how to do it with gallery.condition however for a reason, my images don't want to lock at all. Here is the code, maybe someone can help?
Code: Select all
$ persistent.boss_unlocked = False
$ persistent.bottom_unlocked = False
init python:
gallery = Gallery()
gallery.button("boss")
gallery.image("bg office_boss")
gallery.condition("persistent.boss_unlocked")
gallery.button("Test2")
gallery.image("office_PP.jpg")
gallery.condition("persistent.bottom_unlocked")
screen illustrations1:
tag menu
hbox:
xalign 0.5
yalign 0.5
spacing 80
grid 3 2:
add gallery.make_button(name="boss", unlocked="office_boss_mini.png", locked="Lock_mini.png")
add gallery.make_button(name="Test2", unlocked="office_PP_mini.png", locked="Lock_mini.png")
add gallery.make_button(name="Test2", unlocked="Chibi_Alex.png", locked="Lock_mini.png")
add gallery.make_button(name="Test2", unlocked="Chibi_Alex.png",locked="Lock_mini.png")
add gallery.make_button(name="Test2", unlocked="Chibi_Alex.png", locked="Lock_mini.png")
add gallery.make_button(name="Test2", unlocked="Chibi_Alex.png", locked="Lock_mini.png")