Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Could you show me the gallery script?

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.