how to disable everything except one window ?

thierryg

12-06-2014 18:04:40

Hi,

I need to display alert windows, (asking for confirmation, ok or cancel), and I would like to disable everything behind it, to prevent the user to continue using the gui until he answer the question.
So the idea is to freeze everything, except one window.

Is there a simple way to do that ?

Thanks !
T.

Altren

12-06-2014 20:49:26

Create fullscreen widget without skin or with simple gray color to fade everything behind. Use some high layer to make sure this widget is on top and catch mouse input thus making all other widgets inaccessible.

thierryg

13-06-2014 08:46:02

Thanks for your answer: it's working perfectly.

Have a nice day,
T.

scrawl

13-06-2014 17:42:29

There is an even better way: Use a modal widget.


MyGUI::InputManager::getInstance ().addWidgetModal (mConfirmationDialog);


If a modal widget is active, MyGUI will automatically disable all other widgets that aren't modal widgets.