Modal dialogue - no input for background GUI elements?

Hello,

I’m trying to make a modal dialog box. That’s a simple 2 button Yes/No box so the user confirm his/her last action.

That element should prevent any other background GUI element to receive inputs. So behind buttons can’t be clicked, should not react when the mouse is over etc.

I just can’t find a way to do that, either with the depth or by intercepting events.

Can someone help ?

If you use a Window for your dialogue it will block click-through as long as the window is on top.

-Jeremy

Just to elaborate on Jeremys answer: Your actual window component would occupy the entire screen space while your graphical window would be rendered inside it. That way - clicks around the graphical window would still be caught by the window component.

Thanks!

I tried that, drawing a fullscreen window, but unfortunately the GUI elements behind it still get some of the user input - buttons are draw with Hover image for instance -, though the fullscreen window is graphically drawn on top of them.

I tried, but it couldn’t be done.

I created a window which is screen.width and width.height. But I can still click on the button who is behind the window.