z-order

luwei

11-08-2010 08:07:14

How to set the widget z-order? Thank you!

my.name

11-08-2010 09:11:23

Widgets do not have z-order.

luwei

11-08-2010 09:53:41

if one staticImage is cover in another one,How to change the order?

my.name

12-08-2010 09:32:41

show me example picture.

luwei

12-08-2010 10:59:50

such as:
MyGUI::StaticImagePtr mMainScoreImage = getGUI()->createWidget<MyGUI::StaticImage>("StaticImage", 1033, 896, 315, 128, MyGUI::Align::Default, "Info");
MyGUI::StaticImagePtr mMainPanelImage = getGUI()->createWidget<MyGUI::StaticImage>("StaticImage", 1033, 896, 247, 225, MyGUI::Align::Default, "Info");

The mMainScoreImage staticimage is under the mMainPanelImage,but i want to change their order, the mMainScoreImage is top of mMainPanelImage.Have any function?

G4rth

16-08-2010 10:55:47

You have to set the layer of the widgets. If you haven't set layers up in your xml file, go take a look at the example media.

luwei

18-08-2010 07:00:51

Only in xml can set the layer?

Altren

18-08-2010 14:07:36

MyGUI::StaticImagePtr mMainScoreImage = getGUI()->createWidget<MyGUI::StaticImage>("StaticImage", 1033, 896, 315, 128, MyGUI::Align::Default, "Info");
MyGUI::StaticImagePtr mMainPanelImage = getGUI()->createWidget<MyGUI::StaticImage>("StaticImage", 1033, 896, 247, 225, MyGUI::Align::Default, "Main");
Info and Main is different layers, ano above another.

luwei

20-08-2010 06:52:07

Thanks, Altren.
But,i thank that should a function to change.

tp

27-08-2010 06:24:42

I think this issue is the same as one I've been having, so a couple of clarifying questions.

Using two layers like this would mean double the number of batches, is that correct? I think the layer solution is elegant in its own right, but inefficient in some cases. Is there a particular reason why the faces on a layer batch can't be sorted and drawn by z-order? (I'm not exactly asking for a feature to add a z-index to every widget, simply guaranteeing that child widgets are added to the batch after their parents would be enough for me.)

Altren

27-08-2010 14:30:47

I think this issue is the same as one I've been having, so a couple of clarifying questions.

Using two layers like this would mean double the number of batches, is that correct? I think the layer solution is elegant in its own right, but inefficient in some cases. Is there a particular reason why the faces on a layer batch can't be sorted and drawn by z-order? (I'm not exactly asking for a feature to add a z-index to every widget, simply guaranteeing that child widgets are added to the batch after their parents would be enough for me.)

Well, two layers not doubles amount of batches, but adds one more. (doubles only if you had only 2 widgets with same texture)
Widgets on same layer sorted by order of creation, but it's not recommended to create overlapping widgets on layers without overlapping property.
To up widget on Overlapped layer you can use MyGUI::LayerManager::getInstance().upLayerItem(myWidget);
And about child widgets - they are always drawn after their parents.