0 votes

hello,

In the pause menu that comes on top of my game, I have buttons. Problem is, I used a sprite as my menu's background and it lets the mouse detects other buttons beneath it (from the game), regardless of the Z index of each element.

Is there a node that 'blocks' the buttons underneath and avoid double button detection ?
Thanks !

in Engine by (245 points)

1 Answer

0 votes

The Godot UI has a Mouse option that lets you define if the mouse can click on objects bellow.

Instead of using a sprite use the TextureRect

by (1,440 points)

I put my background (now a TextureRect) and my menu buttons to "mouse_filter > Stop" but it doesn't seem to do anything...

Can it have anything to do with using a separate scene for the pause menu ?

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 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 webmaster@godotengine.org with your username.