proper node for menu's backgrounds ?

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

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 !

:bust_in_silhouette: Reply From: MysteryGM

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

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 ?

nonomiyo | 2018-09-21 09:50