Hey! Sorry for the delay, different time zones and a busy work day.
The grid looks rather promising, I’ll try it out! I still do want to solve this issue using StackPanels though just for the sake of getting more familiar with them.
Thanks for the time! I’ll use the grid, but I’d still love to figure out if this is a use case stack panels can support at all.
Speaking in colors:
- Red must fill the available screen space
- Orange must cover red (except the 50px at the top for the action bar)
- Pink must cover orange
- The yellow “GAME INFO” elements should expand horizontally (optional, would have been a follow up question )
- No element may go over the screen boundaries
I hope this makes sense?
One question regarding your PG:
__automaticSize do? It looks like a private member.
Another highly related question as well: I’ve been reading though some more forum posts today and I’ve seen a lot of people going with DOM based UIs for their game.
This strikes me as interesting since I just migrated away from a DOM based UI. What is the best-practice approach regarding UI technology recommended by experienced Babylonians/Devs?
I’ve seen some posts saying that if you need UI interaction with the game world one should use the Babylon GUI - otherwise DOM. Does this still hold true?
If so, this slightly concerns me as it has the hidden implication (at least to me) that using the Babylon GUI is a downside as it is only “needed” for this case.
I’ll also add a third issue (yell at me if I should open a new thread for any of these instead of hijacking this thread for three UI related, albeit different problems):
It looks like the order in which I add inputs to the UI affects if I can interact with them or not. Unfortunately I cannot always add inputs last due to heavy UI nesting. See this PG: Babylon.js Playground
zIndex does not seem to help, and I’d really like to stay away from it since you quickly loose overview over which zIndex to use.