What's the best UI layout tool you've ever used in a game engine, and why?
Not sure about layout tools themselves, but capability-wise, but relative anchoring is one of the things that I put into our UI system from the get-go, as it's really wildly convenient. Each UI element has an 'anchor' and a 'justify' parameter.
-
-
The Anchor param is a vector typically (but not limited to) 0,0..1,1 which defines the point on the element's parent, from BL to TR, which will be the origin point for the sub-element. Justify is the same, but defines the origin point on the sub-element itself.
-
So if I have two boxes, one being the child element of the other, and I want Box2's left side to be pinned to the right side of Box1, I would do something like: hud::set_anchor(&box2, vector2(1.0f, 0.5f)); hud::set_justify(&box2, vector2(0.0f, 0.5f));
- Näytä vastaukset
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.