- Setting-up layout out of 2 parts using UIElements.
i.e. window - LM_HORIZONTAL,
UIElement_a - LM_VERTICAL
UIElement_b - LM_VERTICAL
window.AddChild(UIElement_a)
window.AddChild(UIElement_b)
UiElement_b.maxWidth = graphics.width * 0.25f;
Adding View3D to UIElement_a
Adding a few buttons as children to
UiElement_b - everything works as expected.
We see a screen with view3d on left, buttons on right, buttons use 1/4 of width.
Now we delete all children from left and right layouts.
Then we add UIElement_c (LM_FREE) to left and
a few other buttons to right. This goes absolutely haywire.
- Buttons occupy 50% of width.
- Everything is offset down like it was centered vertically.
If I delete all GUI and reconstruct from scratch, everything works as expected.
Any ideas? Why layout is messed-up?