Skip to content

Dialogs: declare the PanelSpriteButton and Gamepads extensions as required - #2377

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

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

Conversation

@4ian

@4ian 4ian commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

Description

The Dialogs extension (#2374) did not declare the extensions it uses. Its dialogs have buttons of the PanelSpriteButton extension, and the choices dialog reads gamepads with the Gamepads extension. When an Info dialog or a Choices dialog was added "from scratch" (not from the asset store, which installs the extensions of the asset) to a project without PanelSpriteButton, the buttons had an unknown object type, and the in-game editor crashed:

Object type "PanelSpriteButton::PanelSpriteButton" was not found - using a placeholder object as a fallback.
TypeError: Cannot read properties of undefined (reading 'width')
    at new h (A_RuntimeObject3D.ts:85:28)
    at new oi (InGameEditor.tsx:9331:7)
    ...
    at new InfoDialog (gdjs-evtsext__dialogs__infodialog.js:9:5)

This adds requiredExtensions (Gamepads 0.9.3 and PanelSpriteButton 2.2.1, the current versions), like LeaderboardDialog and TwoChoicesDialogBoxes do, and bumps the version to 1.0.1. Nothing else changes. Area title only uses built-in extensions (Tween, Anchor), so it needs nothing.

The crash itself comes from GDevelop: in the in-game editor, the placeholder of an unknown object type is a 3D object that reads objectData.content.width, and the data of a custom object (like a PanelSpriteButton) has no content. It is not fixed here; with this PR, the type is not unknown anymore.

Tests

  • npm run build (the extension checks): pass.

Checklist

  • The checks of this pull request pass.
  • This extension can be distributed and MIT licensed.

AI usage

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

Generated by Claude Code

- 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.
…o claude/dreamy-mendel-iw5mn6

# Conflicts:
#	extensions/community/Dialogs.json
@4ian
4ian requested a review from a team as a code owner November 26, 2026 11:12
@4ian
4ian merged commit 9e56f69 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