0 votes

I don't understand these Control nodes.

I have custom tooltip, it is Panel Container > VerticalContainer>a lot of labels and Hcontainers with labels. I am trying to make it expand to the screen in a way it is always visible. So I detect quadrant of the screen and set grow direction flags - if x or y is greater then half of screen - GROW BEGIN. But every time it is supposed to grow to BEGIN and not END, visually it centers tooltips axis on mouse position, just like it would be GROW BOTH in editor. I get it that I should adapt anchor, pivot or globalposition in some way. But whatever works in editor, it doesn't work in code in runtime. I suppose the problem is that flags can only be changed before tooltip grows, and tooltip gets information about its total size only after ready function, when all labels are filled. And after ready() it seems like tooltip no longer reacts to changing of rectpivot or anchors.

I am pretty sure I am missing some basics about pivots and growing flags. Please somebody enlight me.

Godot version godot 3.2 stable
in Engine by (7,925 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.