I have a custom UI screen that is a character profile screen. I want to add unlockable character images to my game that the player will earn as they play. Then they can view the unlocked character images on the character profile screen.
I have a screen established and it works perfectly as a static display with the character bio, likes, dislikes, etc. But now I'm trying to take it from a static window to one that has some imagebuttons on it and dynamic image swapping.
My problem is that it is placing my character images behind the open profile screen. I would like to have it display the character image on top of the open window.
This is what my code looks like for the imagebutton:
Code: Select all
imagebutton:
xalign 0.700 yalign 0.800
idle "profile_pic_01_idle.png"
hover "profile_pic_01_hover.png"
action Function(renpy.show, "jenny_profile_pic_01")
There will be multiple of these image buttons on the screen, so my example is for the first button, but I might have 4 or 5 (or more) unlockable images for a character so I will have multiple image buttons on the screen, each linked to showing a specific picture.
I'd love some help with how to display my character pic over the top of the window. Or if there's a different/better way to do it than what I'm doing above, I'm open to suggestions.
Oh! And a bonus question! Is there an efficient/quick way to hide any other profile images that might be displayed already? Like what if I have profile_pic_02 displayed and I click the button for profile_pic_01, I need to hide profil_pic_02 but also any other potential numbers. Basically I'm looking for a catch-all way to hide all other profile pic images except the one I clicked the button for.
Edit: I'm actually also having trouble with positioning. It is placing the image at the bottom-center of the screen by default and I'm trying to move it, but I keep getting a traceback error with "invalid syntax" on the line for my "action Function..." command.
Thanks!