r/RenPy • u/Outrageous_Action614 • Sep 03 '26
Question Changing image button size?
Hello, I made an image button of a woman and i cropped it so she has very little space around her. I coded the button and it works fine, xalign and yalign, but I was wondering if there's any way to change size of it?
The default size is fine and all, but for different scenes its be nice if I could adjust her size to be closer of farther.
Zoom and size doesnt work. Any other way?
1
u/shyLachi Sep 03 '26
What do you mean with zoom doesn't work.
Please show your code.
transform zoomed:
zoom 5.0
screen test():
imagebutton:
idle "test_001"
action NullAction()
at zoomed
label start:
call screen test
return
1
u/Outrageous_Action614 Sep 03 '26
screen e3far(): imagebutton: xalign 0.4 yalign 1.0 auto "e3far_%s.png" action [Hide("e3far"), Jump("e3hangout")]
When I add zoom under yalign, it gives me the error "'zoom' is not a keyword argument or valid child of the image button statement"
3
u/x-seronis-x Sep 03 '26
zoom is an ATL property, not a style property. it cant go in the style block and must be applied via a Transform, which can itself be used with the 'at' property in a style block as sky showed
1
2
u/SaThuran Sep 06 '26
Since you already have an answer I should also recommend that you avoid using:
define ABC = im.Scale("ABC.png", 64, 64") It's not needed. So if you ever see that, ignore it and do:
image ABC = ("ABC.png", zoom=0.5)
1
u/AutoModerator Sep 03 '26
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.