Skip to content

New extensions: Dialogs (info dialog, choices dialog) and Area title - #2374

Merged
4ian merged 3 commits into
mainfrom
claude/dreamy-mendel-iw5mn6
Nov 26, 2026
Merged

4ian merged 3 commits into
mainfrom
claude/dreamy-mendel-iw5mn6

Conversation

@4ian

@4ian 4ian commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR adds 2 new extensions of custom objects for the asset store. Both are made with events. The only JavaScript is the usual IsInGameEdition helper of the UI extensions, used in Area title.

Dialogs (Dialogs) has 2 objects:

  • Info dialog (InfoDialog): a title, a message, a button (like "OK"), an optional close button and an optional icon.
    • Conditions: Button is clicked and Dialog is closed. The dialog is closed by the button, the close button, Enter or Escape.
    • Actions and expressions: title, message and button label.
  • Choices dialog (ChoicesDialog): a title, a message and up to 5 choices, like a pause menu or a question to the player.
    • A choice with an empty label is hidden, and the panel shrinks to end under the last shown choice.
    • An optional Selector panel follows the focused choice.
    • When the dialog is resized, the panel and the selector are fitted again to the resized choices.
    • Arrows, Tab, the gamepad D-pad, Enter, Space and the gamepad A button pick a choice. Hidden choices are skipped. Mouse hover moves the focus.
    • Escape and the gamepad B button close the dialog. This can be turned off.
    • Conditions: Choice is picked (with the choice number), Any choice is picked and Dialog is closed.
    • Expressions: Picked choice, Picked choice label, Focused choice and Choice label.
    • Actions: Focus a choice, Choice label, title and message.

Area title (AreaTitle) shows the name of an area or a level, with a subtitle, when the player enters it:

  • It fades in, stays for the display duration, then fades out. A decorative line grows from the center.
  • By default it is shown when created. The action Show a title changes the texts and shows it again, for example when the player enters a new zone.
  • Conditions and actions: Is shown, Show, Hide, title and subtitle.
  • In the scene editor it stays visible, so that it can be placed and styled. This uses IsInGameEdition.

Both are made to be easy to use for users and for the AI agent: few concepts, clear condition names and single-frame "is picked" or "is closed" signals. The author is the GDevelop account.

The ready-to-use variants come in 25 styles. The 11 drawn styles (Neon, Cozy, Candy, Retro Pixel, Tactical, Dark Fantasy, Horror, Racing, Kingdom, Ethereal, Minimal) are in GDevelopApp/GDevelop-assets#750, and the 14 styles made with CC0 asset packs are in GDevelopApp/GDevelop-assets#752. Both are to be merged after this PR. For each style there is an info dialog, a choices dialog (pause menu), an area title and a level banner. All of them are rendered by GDevelop here:

dialogs and area titles

How to use it

  • Info dialog: add one from the asset store, then use Dialog is closed to delete it or go on.
  • Pause menu: add a choices dialog on a UI layer, then use Choice 1 is picked to resume, Choice 3 is picked to quit, and so on.
  • Area title: put it on a UI layer. It shows itself at the start of the scene. To show it again when the player enters a zone, use Show a title with the new name.

Tests

I ran gameplay tests with GDevelop 5.6.287 (nightly), headless, on projects with the assets of each style installed. The 11 assertions pass in each style:

  • Empty choices are hidden, and the panel ends under the last shown choice.
  • Down then Enter picks the 2nd choice.
  • Hidden choices are skipped and the focus wraps back to the 1st choice.
  • Clicking the 3rd choice picks it.
  • Escape closes the dialog.
  • Enter confirms and closes the info dialog.
  • The area title fades in, is fully shown after the fade, and is hidden after its display duration.

A resize test renders the dialogs at their default size, narrower and taller, and wider and shorter: the choices dialog keeps its panel ending under the last choice and its selector around the focused choice.

npm run build (the extension checks) and npm test pass.

I couldn't attach an example project ZIP from this environment. The test project is generated by tools/ui-themes in GDevelop-assets: run python3 build.py theme_cozy --new-objects.

Checklist

  • The checks of this pull request pass.
  • New extensions are added to extensions/community/.
  • The example project is attached as a ZIP file (see above).
  • This extension can be distributed and MIT licensed.

AI usage

  • I used an AI to generate some part of the code. The events are generated by the scripts in tools/ui-themes/ext of GDevelop-assets.

- Dialogs: an info dialog with a button and an optional close button, and a
  dialog with up to 5 choices (like a pause menu). Hidden empty choices, a
  selector following the focused choice, mouse, touch, keyboard and gamepad.
- Area title: the name of an area or a level with a subtitle, shown with a
  fade when the player enters it.

Made only with events.
@4ian
4ian marked this pull request as ready for review November 26, 2026 10:47
@4ian
4ian requested a review from a team as a code owner November 26, 2026 10:47
@4ian
4ian merged commit aa49835 into main Nov 26, 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