with-heart / aoe2-ui

2 stars 0 forks source link

Incorrect `z` for widget children #41

Closed with-heart closed 8 months ago

with-heart commented 8 months ago

Problem

Widgets that are children of a widget with a ZPlane value but no ZPlaneLocalOffset are being rendered at the same z as that parent, which means a number of elements are hidden behind their parent.

Here's an example of CommandPanel buttons being hidden behind BackgroundLeft:

image

If we implicitly add 1 to the z of these child elements, we can see that the buttons are displayed correctly:

image

Solution

Widgets that are children of another element should have an implicit increase in their z (+1).