Add a simple way to retrieve the "absolute position" of a UIBlock. #377
SandustriesKaister
started this conversation in
Feature Requests
Replies: 1 comment
-
I absolutely agree with this, I've been trying to deal with the position of my UI for the last two days and it has been a headache, achieved nothing for now. I made this post (#375) with kind of have the same goal, better positioning. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In my opinion the most important thing NovaUI is lacking is a way to get the "absolute position" of a UIBlock. What I mean by this is that the Position for the UIBlock is always the local position and not the global position; the position that is displayed on a UIBlock is one that is relative to all other UIBlock parents. Therefore, just from the position value alone I can't really tell exactly where it is on my screen, unless I make a custom function and loop through every single parent to and do special calculations for it. This is daunting for an intermediate programmer like me when you take into consideration that the way the "pivot points" on the UI works for peculiarly compared to most UI engines. If such the UIBlock's parents all have inconsistent pivot points then calculating this "absolute position" will be more difficult. I suggest that this new field, if it even is added, should always be the bottom most-left point of the UI- so that it also aligns with what Unity considers the origin of the screen.
Without an absolute position, I can't do things such as a custom slider because of the fact I don't even know where my slider is located in comparison to my mouse's position.
Beta Was this translation helpful? Give feedback.
All reactions