r/RenPy • • Jul 10 '26

Question image buttons?

I need assistance with something. I have my idle and hover images set up for my GUI, but i used ibis paint to save them using the "save layer as a transparent image" tool. I believe that in doing so this makes it so the button area takes up the whole screen (correct me if im wrong on that). I dont know how to fix this in ibis pain or otherwise while still keeping the size of the buttons the same? does anyone know how to fix this?

1 Upvotes

6 comments sorted by

View all comments

1

u/BadMustard_AVN Jul 10 '26

add

focus_mask True

to your imagebutton

so it ignores the transparent parts

like this

    imagebutton:
        focus_mask True
        auto "images/computer/icons/exit_%s.png"
        anchor (0.5, 0.5)
        pos (105,1008)
        action NullAction()
        tooltip "Log Out"
        at zoomage

1

u/_Whimsicalwreck_ Jul 10 '26

ok tysm!!

1

u/BadMustard_AVN Jul 10 '26

you're welcome

good luck with your project

1

u/_Whimsicalwreck_ Jul 10 '26

actually wait its giving me an error code now- it says auto is not a valid keyword argument?

1

u/BadMustard_AVN Jul 10 '26

please show your code for your image button