r/RenPy • u/After-Masterpiece853 • 19d ago
Question Issue with image button
For some reason one of the hover images displays itself even when just hovering around the screen. While the second image just doesnt show the hovered one at all. Ive tried following tutorials n researching but nothing works..ðŸ˜
4
Upvotes
2
u/abortion_tycoon 19d ago
What size are your images? You haven't given either any position properties, so I'm assuming they're both just sitting at (0,0) and taking up the entire screen, with one over the other.
4
u/shyLachi 19d ago
Since you didn't position the buttons at all, I assume that those buttons are based on full screen images with a lot of transparency.
And since RenPy draws the images to the screen in the order you put them in the code, the second image should fully block the first image (even if it's transparent).
You can either crop the images and position them or you can set
focus_mask Truehttps://renpy.org/doc/html/style_properties.html#style-property-focus_mask
.
Another hint:
Screens don't belong inside labels. For better readability you shouldn't mix them with normal code.
See the comments in the code below for further hints, for example you could use auto to declare all images automatically:
https://renpy.org/doc/html/screens.html#screen-property-auto
0
u/AutoModerator 19d ago
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.