Repository navigation
New extensions: Dialogs (info dialog, choices dialog) and Area title - #2374
Merged
Merged
Conversation
- 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.
…per in Area title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
IsInGameEditionhelper of the UI extensions, used in Area title.Dialogs (
Dialogs) has 2 objects:InfoDialog): a title, a message, a button (like "OK"), an optional close button and an optional icon.ChoicesDialog): a title, a message and up to 5 choices, like a pause menu or a question to the player.Area title (
AreaTitle) shows the name of an area or a level, with a subtitle, when the player enters it: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:
How to use it
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:
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) andnpm testpass.I couldn't attach an example project ZIP from this environment. The test project is generated by
tools/ui-themesin GDevelop-assets: runpython3 build.py theme_cozy --new-objects.Checklist
extensions/community/.AI usage
tools/ui-themes/extof GDevelop-assets.