How to make an upgrade menu where items disappear after purchase and shift up?

Hi!
I want to create an upgrade menu where each button represents a separate upgrade (like +speed, +income, etc.).

After purchasing an upgrade, the corresponding button should disappear, and all remaining buttons should automatically move up to fill the gap.

There can be 10 or more upgrades, so it needs to work dynamically.

Question:
What’s the best way to implement this behavior in GDevelop? Especially the part where remaining buttons shift up after one is removed.

Thanks!

I would set up a series of events to handle the menu update:

  1. Trigger a tween animation that makes the upgrade option disappear — for example, by fading it out or shrinking it.
  2. Once the disappearing tween completes, identify all the menu options positioned below the one being removed and tween each of them upward.
  3. Finally, remove the upgrade option that’s just disappeared.

To detect the options below the one being removed, you can use a tall, narrow sprite placed just underneath it. Then, use a collision check to select all menu items that overlap with that sprite.