Cannot click TextureButton

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By GameVisitor

Hey all,

I know this sounds easy but i cant seem to figure out in a particular scene I have (it is working in other scenes normally). In my end game scene that i am loading, i have the following structure

My scene loads correctly, playing the animation and displaying the info expected, however the button is neither “hover-able” nor “click-able” although all basic settings have been tested (texture normal / hover, mouse filter pass / stop on all nodes leading to the button, focus mode : all, show behind parent = false …)

Any idea that might route into the correct direction ?

I checked this and this but didn’t help…

Thx.

the last TextureRect could catched mouse event.
is that TextureRect covered a button?

volzhs | 2019-05-02 12:05

Did you ever figure this out? I’m also having the same issue and can’t find support?

IdkAustin | 2020-06-18 06:36

:bust_in_silhouette: Reply From: cgx

I had the same problem. I ended up using the “Button” node and replaced the property “Custom Styles” with new “StyleBoxTexture” for each option.

:bust_in_silhouette: Reply From: Arti

I think I had the same problem, for those who come next :
I did not put a texture for the focused state, and it worked for me.

:bust_in_silhouette: Reply From: cronodia

In case any other dev gets here: I found that the best way to determine what exactly “has been clicked” is by using the “clicked control” part of the debugger.

Instructions:
1.- Run your scene using the play button (top right corner), move it to another monitor/place so it doesn’t bother you.
2.- While the scene is running, on the Godot editor window look for the “output”, and click on “debugger” (see pic below)
3.- Inside the debugger, look for the last tab “misc”, there you will find useful information (take special notice of the “clicked control” input), click on any place on the scene you’re trying to debug to test it, each time the user clicks on a clickable node, you will find the info there.

Good luck

Thank you I have been trying to figure out why my button wouldn’t press for hours and this worked!

MasterRN | 2022-03-22 00:56

thank you so much for that tip, I just found out the reason behind an annoying bug because of that.

Theonean | 2022-11-10 08:15

1 Like

Thanks bro !!! This tip is really really helpful.