Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Cedrei |
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…
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Cedrei |
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…
Reply From: | fpicoral |
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: Customizing mouse cursor — Godot Engine (3.0) documentation in English
Reply From: | i_love_godot |
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