I was just doing this today on my UI.
In my case I was sliding UI targets off the screen. (Sometimes completely off if they are being cleared or to a position nearly off the screen if the targets are just being toggled out of view)
The entire targets list also tweens onto the screen from the right, and off the screen when completed. New items also flash, and the target icon (a checkbox circle) turns into a ticked circles with star particles when a target is completed. If they are toggled off the screen in the hidden position when completed the single completed target slides back on the screen, the completed animations are done, and it slides back off again. There are some other animations for flashing and for targets failed etc too.
Anyway, this was all done as you described with tweening modulation or positions but the key thing I wanted to share was this.
var offset = get_size().x
var current_x_position = position.x
For any particular control node, like for instance a label, or a node in a vbox etc, to slide off the screen to the right, I just store its current position (for sliding back in the future) and tween it’s position.x by its current size to the right. This takes it off the screen, whatever size it’s currently set to.
As for the tree, yes UI trees can get pretty complicated, but only when you expand them all out.
Heres mine for now:
I get annoyed with the TopRightHUD because it has two components in it that needed to be in the top right of the screen in a VBox, breaking my functional convention over layout convention.
The mission targets container looks like this:
And each of the lists themselves look like this (all of the same format):
And targets are instantiated scenes that look like this:
Now, yes, if you expand everything it looks complicated. But taking each element on its own, they are all straight forward enough are they not?
And I am animating the targets, the lists, the labels, the panels, the icons, everything really at different points.
I would not use a dummy node for positioning like that reddit post suggested. There is no need as far as I can tell. But containers do still use position and global_position. So once they have positioned themselves on your screen somewhere, you just need to note in a variable the original position, then tween their position to your hearts content, have it spin around the screen and scale in and out, do whatever you want with it. Eventually you can return it to its original position because you recorded it somewhere.
The only thing you have to be wary of, is recording positions before a container has resized itself. If this happens you can just make it visible but modulate a = 0, await a process frame, then record the position, set the position off the screen, modulate a = 1 again, and tween it back on the screen.
If you have ever worked on website layouts, the css for that can become a complicated mess too, except there you don’t have collapsable trees to maintain sanity.
For @nick_sig example tree, it does look messy, I am sure that could be cleaned up a bit. The bells all seem to have the same structures, and could be generalised bell scenes, or at least in their own margin containers so can be collapsed so you just see beginning_bell, interval_bell etc.
I love the control nodes and think what they do is amazing! If you have a particular animation problem perhaps I can help with that? I am aware some people have felt confused or perplexed by the UI system on Godot, but I am not sure how it could be done any other way, and leave us users still in total control of them.
Anyway good luck. UI’s are fun!