Skip to content

Add the UI prefabs example - #1131

Merged
4ian merged 7 commits into
mainfrom
add-ui-prefabs-example
Nov 26, 2026
Merged

4ian merged 7 commits into
mainfrom
add-ui-prefabs-example

Conversation

@Bouh

@Bouh Bouh commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Adds UI prefabs, an example with one scene per UI prefab, ready to be restyled by replacing images.

preview

What it contains

17 scenes, one per prefab: button, slider, toggle switch, continuous resource bar, resource bar with separated units, text input, multitouch joystick, two choices dialog box, game over dialog, volume settings, animated score counter, star rating bar, multiplayer avatar, info dialog, choices dialog, area title and level banner.

Each scene shows the prefab in 5 styles, each one a variant of the prefab:

Style What it is
Placeholder Flat white with a black outline, to block out an interface before its art is ready.
Style A, B, C Copies of the placeholder, with their own images in assets/Style A, assets/Style B and assets/Style C.
Pixel art A pixel art style: one palette (Sweetie 16) and the Kenney Pixel font (CC0).

How to make a style

Replace the images of one of the assets/Style X folders. Every prefab of that style changes at once, because the dialogs and the volume settings use the buttons and the slider of their own style.

Self-contained

The example depends on no other repository: the extensions (including Dialogs and AreaTitle from GDevelopApp/GDevelop-extensions#2374), their variants, images and fonts are all in the project. Every resource is used by a scene, and every file of the folder is a resource (4.4 MB in total).

Tests

  • node scripts/generate-database.js builds without errors and lists the example as "UI prefabs".
  • All 17 scenes load in a preview and were checked on screenshots, except the text inputs, which headless screenshots do not show.

Bouh added 3 commits November 25, 2026 14:06
Every UI prefab of the asset store in several styles, one scene per prefab: three styles from the asset store, a flat white Placeholder style and a Pixel art style, each being a variant of the prefab.
…he UI prefabs example

The example is self-contained: the Dialogs and AreaTitle extensions, the variants and their images are included in the project.
@github-actions

Copy link
Copy Markdown
Contributor

Preview the game(s) changed or added in this Pull Request


This is an automatic message displaying links to the games in this PR - double check the JSON in case of doubt.

Bouh added 4 commits November 25, 2026 15:00
…aceholder

The placeholder comes first in every scene. Styles A, B and C are variants duplicated from the placeholder, each with its own images in assets/Style A, B and C, so a style is made by replacing these images. The asset store styles and the variants and resources they used are removed.
The default variant of the two choices dialog box now uses the placeholder panel and buttons, so Border.png, Border2.png and the Semi-transparent black and white button variant are removed.
Give the ScoreCounter variants a background and a non-zero preview score, and refit the dialog panel and selector whenever the dialog is resized.
@4ian
4ian merged commit 1595241 into main Nov 26, 2026
5 of 6 checks passed
@Bouh
Bouh deleted the add-ui-prefabs-example branch November 26, 2026 14:42
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