ButtonImage and layering

krockot

20-07-2010 20:14:08

Hi,

I'm trying to use a ButtonImage with a StaticImage (icon) layered on top of it. The ButtonImage states are working properly, but as soon as the state transitions to anything (e.g. from a mouseover leading to focus, and the "highlighted" state), the child StaticImage I've added becomes hidden behind the Button.

<Widget type="Button" skin="ButtonImage" ...>
<Widget type="StaticImage" skin="StaticImage" ...>
<Property key="Image_Texture" value="MyIconImage.png" />
</Widget>
</Widget>


Some quick pseudo-layout XML. I can also reparent the StaticImage outside of the Button, with the same results, regardless of layer assignment. As soon as the ButtonImage receives focus from a mouseover, it starts drawing over top of everything else. Any ideas?

I guess my question is, shouldn't I be able to add children to a ButtonImage and have them stay on top of the button? If not, then how can I achieve a similar effect without having to create a separate ButtonImage resource for each icon button?

Altren

21-07-2010 01:18:55

This sounds like a bug. Please show me any layout that works wrong.
Normal child widget always drawn above it's parent.