Something like this
tweening the size
I know, but I’m talking about repositioning the existing UI to where the old UI that disappeared was,.
You tween both/all of them at the same time. For example:
When you want the bottom one to replace the top one(s):
- Create a tween going to a position one UI height upwards for all the UIs
- For the UIs that need to fade, also add a fade tween to them.
This would cause all the UI to move upwards, and the top most UI to fade away.
The process that happens here is something like this:
- A new UI element (Frame?) is created
- It gets parented to the holder frame with the UIListLayout (will be at the bottom by default)
- Probably set a delay (e.g the
delay()
function) so that it “disappears” (size gets tweened and then destroyed) after a given amount of time.
If you’re talking about the little animation it has, then here’s an explanation:
By destroying a Frame within another that has a UIListLayout, all other sub-frames (if you will) shall automatically be moved upwards to accomodate for the space. The reason it looks like the UI elements smoothly animate/tween upward is because a list will try to accomodate the same space for all of the Frames, regardless of their size.
Here’s a simple comparison.
Rapidly tweening the size of a frame to zero before destroying it will give that effect.
Please let me know if this doesn’t answer your question. Hope this helps
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.