Image picker: tiles are containers, not graphics with children
game-maker / suite (push) Successful in 9m14s

The twin of the font picker fixed earlier today: every tile was a Graphics
carrying its sprite and caption, which Pixi v8 answers with "addChild:
Only Containers will be allowed to add children". The background moves
into its own Graphics inside a Container, and the step watches the console
while the picker opens, as the font one does.

Editor suite: 784 checks.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-13 21:17:26 +02:00
1 parent 4f240a50fd
commit 03c4323794
3 files changed
+18 -8

No files matched your search

+7
View File
@@ -292,6 +292,7 @@ export async function textures(t) {
JSON.stringify(afterUndo),
);
await evaluate('__gm.console.clear()');
await clickText('+');
// By position, not by text: the menu entry "Texture" shares its label with the centre tab, and
// `locate` would hand back whichever it walked into first.
@@ -324,6 +325,12 @@ export async function textures(t) {
JSON.stringify({ spare: captionOf(spare), used: captionOf(texture.file), asset: texture.name }),
);
await shot('34-image-picker');
// A tile is a container holding its background, not a Graphics with children: Pixi v8 warns
// about the latter, and the warning is the only sign that the tiles are built the wrong way.
const tileComplaints = (await json('__gm.console.lines()')).filter((line) =>
/Deprecation/i.test(JSON.stringify(line)),
);
check('building the tiles draws no complaint from Pixi', tileComplaints.length === 0, tileComplaints);
const tile = await json(`__gm.imagePickerTile(${JSON.stringify(spare)})`);
await click(tile.x, tile.y);