Skip to content

Add the ToastStack and FloatingText extensions - #2384

Merged
4ian merged 2 commits into
mainfrom
claude/dreamy-mendel-iw5mn6-toast-stack
Nov 27, 2026
Merged

4ian merged 2 commits into
mainfrom
claude/dreamy-mendel-iw5mn6-toast-stack

Conversation

@4ian

@4ian 4ian commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Two new custom objects (events only), with ready-to-use variants in the asset store (GDevelop-assets#778), and a small improvement of the Toast.

ToastStack ("Toast stack")

Several toast notifications at the same time. The interface is one action, "Show a toast" (title, message, kind), used as many times as needed:

  • Up to "Maximum toasts shown" (3 by default), toasts are shown one after the other. The direction is a property: "Down", or "Up" for a stack at the bottom of the screen.
  • When full (property):
    • the new toast waits for a place;
    • it replaces the oldest toast;
    • or it is not shown.
  • When a toast disappears, the other ones slide to fill its place.
  • "Hide all the toasts", "Hide the oldest toast", "Number of toasts shown", "Number of waiting toasts", "Is any toast shown".

A maximum of 1 with "Replace the oldest" behaves like a single toast. No toast is shown until the action is used.

The stack contains a Toast (of the Toast extension). In the variant, it is the model of every toast: its position is the one of the newest toast, and its own variant gives the style. So every existing toast style can be used in a stack. Each toast is a Toast created by the stack and deleted when it disappeared; the waiting ones are hidden toasts.

Toast stacks in 15 styles

Toast 1.0.3

  • Its slide (when it appears and disappears) is now applied as a change of position instead of setting it from a position saved when it was shown. A toast can now be moved (by events or by a stack) at any time, even while it slides.
  • New "Display duration" action, condition and expression.

FloatingText ("Floating text")

A text, with an optional icon before it, that moves and fades out, then is deleted: damage numbers, "+10 coins", "Perfect!", "Game saved"...

  • Its position is its center. Create it where the text must appear, and change its text with the action "Text". It plays by itself.
  • Properties:
    • Motion: Rise (goes up), Arc (jumps to a random side, like a damage number), Pop (grows to 125% then settles), Stay.
    • Distance and duration. It fades out during the last 40%.
    • "Delete when finished", "Play when created".
  • "Play", "Is playing", "Is finished", "Text".

Floating texts

Tests

Gameplay tests in GDevelop.

ToastStack:

  • 5 toasts: 3 shown, stacked down at the right spacing, and 2 waiting.
  • When the first ones disappear, the waiting ones are shown and slide up.
  • "Hide all" hides them.
  • "Up" + "Replace the oldest" with a maximum of 2: 2 at most, the newest at the bottom.
  • The stack works with the toasts of all 15 styles.

FloatingText:

  • The text of a created one can be changed.
  • It is centered on its position, with the icon before the text.
  • It goes up, and it is deleted at the end.

The tests of the Toast still pass. npm run build, npm test and npm run check-post-build pass.

@4ian
4ian requested a review from a team as a code owner November 27, 2026 17:52
@4ian
4ian merged commit 7e20652 into main Nov 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants