Is there any way of setting the clickable area of a texture button to be different than the area of the texture? I often have textures I want to use with textureButtons, but the texture has extra empty space on the outside. I get around this by creating a button and setting its alpha to 0, and adding the textureRect as a child. however this prevents me from using all the fancy built-in textureButton features ):
Any solutions? thanks
How to set clickable area of a TextureButton
I believe you would want to use the click mask for this. https://docs.godotengine.org/en/stable/classes/class_texturebutton.html#class-texturebutton-property-texture-click-mask
a year later
Megalomaniak added the Godot Help tag .
2 years later
If you get stuck (like I did) trying to add the bitmask, you can duplicate one of your images (perhaps the one you're using for the button). Open the import settings for said duplicated textures and re-import it as a bitmask. You can then use it as a click mask.