Questions on Layers

guido

31-08-2011 18:20:54

1. can I create a new layer using a c++ call instead of an xml file
2. can I create a completely transparent unpickable widget the size of the whole screen/viewport ?if so, how?
3. is a widget automatically added to the layer of the parent it is attached to?
4. can I attach a widget to a parent, but place the widget itself in a different layer than its parent?

guido

31-08-2011 22:06:10

and if someone happens to know; how do I figure out the name of the layer of a widget? getLayerName() doesn't work. Apparently the new version of mygui doesn't use it anymore. I would look it up in the documentation were it not that it isn't online and the cmake generated xcode project won't build the documentation for some reason. I already had a quick glance at the source, but the MyGUI_Widget.h doesn't offer a method to get the name of a layer so it seems...

Altren

01-09-2011 19:04:43

1. can I create a new layer using a c++ call instead of an xml fileSure, and this is shown in wiki page
2. can I create a completely transparent unpickable widget the size of the whole screen/viewport ?if so, how?widget->setNeedMouseFocus(false); and widget->setSize(MyGUI::RenderManager::getInstance().getViewSize());
3. is a widget automatically added to the layer of the parent it is attached to?Widget's parent is either layer or another widget, but if you are asking about order of drawing then yes - it is drawn on same layer as parent.
4. can I attach a widget to a parent, but place the widget itself in a different layer than its parent?Yes, you can:
widget->attachToWidget(parentWidget, MyGUI::WidgetStyle::Popup, "Layer_name_here");, but you should use detachFromWidget if it had parent before.

Altren

01-09-2011 19:06:56

and if someone happens to know; how do I figure out the name of the layer of a widget? getLayerName() doesn't work. Apparently the new version of mygui doesn't use it anymore. I would look it up in the documentation were it not that it isn't online and the cmake generated xcode project won't build the documentation for some reason. I already had a quick glance at the source, but the MyGUI_Widget.h doesn't offer a method to get the name of a layer so it seems...
widget->getLayer()->getName();