Page 1 of 1

Imagebutton to show an image

Posted: Sat Oct 26, 2019 3:52 pm
by richycapy
Hi

Im trying to create a Gallery, but since it combined between images and videos, right now Im trying to create a button that calls the lightbox to show the image...
The idea is to use the same code for all images, just changing the name of the file, this is what I have:

Code: Select all

screen verfoto(pic=False):
    modal True zorder 10
    add 'images/splash/gi/'+pic+'.png'
    button background None action Hide('verfoto')
    
imagebutton auto "images/gui/galeria/thumbs/chloe-imagen-01_%s.png" action Show("verfoto('chloe-imagen-01')")
But it gives me an error since I cant use the action Show while trying calling the name of the file

Can someone help me with this? :D

Thanks a lot!

=============
EDIT:
Found the solution, here is for anybody else looking for something like this:

Code: Select all

imagebutton auto "images/gui/galeria/thumbs/chloe-imagen-01_%s.png" action Show("verfoto", dissolve, "chloe-imagen-01")