Skip to content

Fix Text object position after string updates#8620

Open
2bf wants to merge 1 commit into
4ian:masterfrom
2bf:fix/text-position-after-string-update
Open

Fix Text object position after string updates#8620
2bf wants to merge 1 commit into
4ian:masterfrom
2bf:fix/text-position-after-string-update

Conversation

@2bf
Copy link
Copy Markdown

@2bf 2bf commented May 20, 2026

Fixes #975.

This keeps the Pixi text renderer position in sync after a Text object's string changes. PIXI.Text.updateText(false) recalculates the rendered text metrics, so the renderer also needs to call updatePosition() afterward; otherwise a rotated Text object can keep the old center/anchor placement and appear to move as the displayed string changes width.

This matches the existing BBText and BitmapText renderer behavior, where text-content updates already refresh positioning.

Validation:

  • git diff --check

I made the change in a sparse checkout, so I did not run the full GDevelop test suite locally.

@2bf
Copy link
Copy Markdown
Author

2bf commented May 20, 2026

CI note: the failed checks look unrelated to this renderer change.

Semaphore fails in newIDE typing and newIDE tests while parsing the downloaded libGD.js artifact:

  • newIDE typing: ../public/libGD.js reports TS1128: Declaration or statement expected
  • newIDE tests: Jest fails to parse node_modules/libGD.js-for-tests-only/index.js with the same generated artifact content

Travis fails earlier in the native C++ loop: Core/GDCore_tests segfaults repeatedly and exits with 139. The later JS checks in the same Travis job pass (npm test, Flow, formatting, and script type checks).

This PR only changes Extensions/TextObject/textruntimeobject-pixi-renderer.ts, so these appear to be CI/artifact or native-test failures rather than failures from the position update fix.

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.

[$5 bounty] Text object at wrong position (and moves!)

1 participant