Hello! I love this theme and would love to use it but I can't figure the gallery out since it is my first time working with one. When I change cg_1 to the image name, it shows fine and works fine in game. But when I add new CGs to the gallery (cg_2, cg_3, ...) they automatically appear unlocked even though I haven't played through those scenes yet. Or, they don't show up at all in the gallery.
Viewing post in Pink-Black Ren'py GUI comments
Hi! If you've "played" through the template project before and used the same names as the ones there (as in, the cg_2 for example) and only changed the image paths, the issue might be that you've "unlocked" it that time so it stays unlocked. You can try the "delete persistent" button in the Ren'py launcher. Be careful that it deletes all persistent data (so, persistent variables).
If they don't show up in the gallery, check that you first defined the buttons (in the init python block) then created them (in the gallery pages themselves, you can see the 'add g.make_button' lines there.)
Ah, I did so! But now, the thumbnail of the first cg doesn't show up in the gallery when I go over the scene. This happens when I add a second cg to the gallery list. I have only changed/added to the g.buttons, image declarations, and g.make_button. It's only allowing me to add one cg, and i'm really not sure what's causing this mix up since I copied the same exact steps for the first cg I have added.
I am not sure if I have used the g.button correctly. Please let me know if this is the issue:
###Gallery buttons
#g.button("cg_1")
#g.button("cg_2")
g.button("cg_3")
g.button("cg_4")
g.button("stretcher_cg")
g.button("fire_backstory_cg")
## Declarations for the images used in the gallery. May or may not
## be needed if you're using Ren'Py's automatic image names.
image stretcher_cg = "stretcher_cg.png"
image fire_backstory_cg = "fire_backstory_cg.png"
image cg_3 = "gallery_test.png"
## This is just the button name + _thumb
image stretcher_cg_thumb = AlphaMask(Transform("stretcher_cg", xysize=gallery_thumb_size), "gui/gallery/mask.png")
image fire_backstory_cg_thumb = AlphaMask(Transform("fire_backstory_cg", xysize=gallery_thumb_size), "gui/gallery/mask.png")
image cg_3_thumb = AlphaMask(Transform("cg_3", xysize=gallery_thumb_size), "gui/gallery/mask.png")
screen gal_scenes_1:
###make only 4 buttons
add g.make_button('stretcher_cg','stretcher_cg_thumb')
add g.make_button('fire_backstory_cg','fire_backstory_cg_thumb')
add g.make_button('cg_3','cg_3_thumb')
add g.make_button('cg_4','cg_4_thumb')
You haven't actually added the cg to the button in your init python block
If you look at the original template code:
g.button("cg_2")
g.unlock_image("cg_2")
You have the first line creating the button and the next one adding the image. If you don't add an image, the thumbnail won't show up.
Generally I'd recommend going through the documentation regarding the gallery, to make sure you have everything needed: Here
Oh my gosh, thank you so much. I knew I had something wrong with the buttons. I had a bit of confusion with the "g.unlock" button at first since it kept leaving the thumbnails in the gallery even though I hadn't gone over the scene yet, so assuming I must've messed with something else for it not to work.