Enabling/Disabling Picking of Layers/Widgets at Runtime

Germanunkol

21-10-2014 14:32:27

I want to switch the mouse between different layers (which are displayed on different screens in the 3D-Scene), so I need to disable mouse-picking for a layer, and re-enable it later, without making the layer invisible.

I know I can move the mouse pointer by using:

MyGUI::PointerManager::getInstance().setLayerName( "Layer2" );

However, this doesn't actually disable mouse picking on Layer1.

I know I could make all widgets on a layer children of some other widget and then set that widget as a modal widget, but that's not really what I want.

Maybe unlinkWidget is what I'm looking for? But then how do I re-enable the widgets?

void InputManager::unlinkWidget(Widget* _widget)


So how do I disable (and later re-enable) mouse picking for a whole layer at runtime?