+1 vote

Is there an easy way to make the mouse automatically change to the "clicking hand" when hovering a button in Godot? I haven't gotten it to work...

in Engine by (20 points)

2 Answers

0 votes

If you are using different textures for hover and normal, you could check in the _process(delta) if the texture is the hover texture. It this returns true, then change the cursor, else, change to the default cursor.

How to change the cursor: https://docs.godotengine.org/en/3.0/tutorials/inputs/custom_mouse_cursor.html

by (521 points)
+3 votes

To accompany fpicoral's answer, if you do not want custom textures as the cursor there are options for that in control nodes.

For example if you are using a TextureButton go to the Inspector:

Mouse > Default Cursor Shape and select Pointing hand

This will give you that look of hovering over a link in a web page, if that's what you're looking for. Hope this helps :)

by (374 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.