+2 votes

I have a button in my scene, it is set to the stop mode for the mouse filter (idk what this does) and it is not responding to anything, not even changing color on mouse enter... any clue what is going on?

EDIT: This is happening for option buttons too, not just regular ones

in Engine by (157 points)

Do you have anything overlapping the buttons? Maybe with visibility off?

No... I don't think so. I even put in on a canvas layer with layer 100, still didn't work.

To ask the obvious: Disable isn't checked?

No, only flat...if that matters

I'm sorry and I had somewhat same problem. I paused the game and forgot to set pause process of a button to process -_-

2 Answers

+6 votes

Partly as a reminder to myself... Things to check:

  • Is there anything in front (a.k.a. further down the scene tree) that may be blocking the button? This can include invisible things. Make sure control nodes are set to 'Mouse > Filter = Ignore' if you don't want them to get mouse events.
  • Make sure the button is enabled and has mouse mode set to 'Stop'. You may also make sure it has the button mask for the mouse buttons you want to use.
  • If you are using _input functions in gdscript, make sure you are not gobbling up that input with get_tree().set_input_as_handled()
  • If you have any viewports in your scene, those may gobble up inputs for things overlapping that viewport. Set the viewport to 'Gui>Disable Input=true' to stop it from doing that.
  • If you have any modal windows, make sure those are not set to exclusive. That will keep things outside that modal from being clicked.
  • If you are using a canvas layer with any transformations or with follow viewport turned on, it won't work. That is currently broken (9/18/2020 Issue: https://github.com/godotengine/godot/issues/35965#issuecomment-625929362 )
by (30 points)
0 votes

please note:
if the button you press loads a scene and that scene has error's(i.e missing script etc. )
the button will not work.

so as a way to fix that
look at the script file under the button that is not working
make not of the scene it is trying to load.
in the FileSystem try to open the scene it will tell you if it has missing scripts etc. fix the erorr. then save all scenes

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