Possible to get a list of images currently shown on screen?
Posted: Thu Jan 21, 2021 9:40 am
So I have an idea for a cellphone interface where the game shows a cellphone in the foreground and blurs the background image.
I realize I could create a screen, where I pass it the name of the current game background and do something with im.Blur().
But I had it in my head to make it more generic than that and have the screen "figure out" the current image background based on some mythical, yet unknown to me, list of active images.
The closest I can find at first glance is some combination of renpy.list_images() and renpy.showing(). But since one is a list of images and the other deals with displayable tags - I'm both not hopeful and somewhat concerned that looping through a list of ALL images looking for the showing ones might be too slow.
Can anyone point me in the direction of an alternate solution?
Ideally an image function that has a list of currently shown images.
I'm figuring with a list of current images, I could work out the image dimensions and hopefully only find a single image which is a full screen image (i.e. the current background).
I know the "pass the image name to the screen" is a simpler solution. But it'll bug me if I don't at least try to work through this more generic solution.
In all likelihood, there will be other problems that will make it impractical... but I had to ask.
Cheers in advance for any help offered.
I realize I could create a screen, where I pass it the name of the current game background and do something with im.Blur().
But I had it in my head to make it more generic than that and have the screen "figure out" the current image background based on some mythical, yet unknown to me, list of active images.
The closest I can find at first glance is some combination of renpy.list_images() and renpy.showing(). But since one is a list of images and the other deals with displayable tags - I'm both not hopeful and somewhat concerned that looping through a list of ALL images looking for the showing ones might be too slow.
Can anyone point me in the direction of an alternate solution?
Ideally an image function that has a list of currently shown images.
I'm figuring with a list of current images, I could work out the image dimensions and hopefully only find a single image which is a full screen image (i.e. the current background).
I know the "pass the image name to the screen" is a simpler solution. But it'll bug me if I don't at least try to work through this more generic solution.
In all likelihood, there will be other problems that will make it impractical... but I had to ask.
Cheers in advance for any help offered.