0 votes

hi guys , i need to set button around texture borders
texture should be like black border around my green country
enter image description here

but i dont wanna make 5 buttons inside it.
how can i set button borders around texturre ?
or maybe i can make sprite pressed?

Godot version 3.2.4
in Engine by (16 points)
edited by

1 Answer

+3 votes

Use the texture_click_maskproperty of the TextureButton in order to make a custom shape for your button. Make a black and white image with the white being your country (clickable) and the black being the rest of the rectangle (not clickable).

by (8,528 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.