- Edited
I'm working on a 2D project and am trying to achieve the following:
- Game has a minimum width/ height; if the window is smaller than that, exit with error message
- Game has an up-to width/ height; up to this size, additional content will be shown
- Game has a maximum width/ height; above this size, black bars will be shown
- Game allows resizing of the window and adapts to the new size on-the-fly
I'm struggling. Particularly, the following problems/ questions arise:
- What's the right/ best root node to use? I'm currently using
Node
as it is the most generic - How can I make a container not exceed the maximum width/ height?
- What parts of the setup should I try to set up via UI (container/ control) nodes and their properties, which should be done with code?
- Currently, I'm trying to set the
rect_size
of containers to the root's size (= window size?), but they simply resize to be able to contain larger child nodes; instead I'd like child nodes to shrink to adapt to the parent container; how?
Sorry, lots of questions, quite chaotic. But that mirrors what's going on in my head. I'm a noob, please don't decapitate me. Any pointers are appreciated.