Open Ali-RS opened 5 years ago
I don't think it belongs on GuiGlobals as it isn't really what it's for and also "which camera" becomes a critial question centrally. On something lilke PopupState it probably makes sense because that both is already tied to one camera/root and has a concept of a scaling that is different than Camera by itself. (Useful for resolution independent UIs.)
Wherever the method goes, it doesn't need its own position enum, though. It can just combine HAlignment and VAlignment... which would make that method a bit simpler anyway.
I feel the right way to achieve this would be put the target panel in a fullscreen container and let the layout do the positioning. However, this currently isn't a panacea: from what I gather in Lemur's code, it would prevent you from animating translations (due to a clash in layout vs animation mechanisms both intervening on the panel's local translation).
But I may be wrong, having only a fairly recent interest in Lemur 😛.
I have a GuiManager with a static method to position a Panel on gui (ex: Center, Left, Right, Up, Bottom)
GuiManager.setPosition(panel, GuiManager.Position.CENTER, getApplication().getCamera());
Would be something similar useful to add in GuiGlobals ?