Skip to content

Release v5.2.0 - #33

Merged
mikebarkmin merged 1 commit into
mainfrom
changeset
Jul 29, 2026
Merged

Release v5.2.0#33
mikebarkmin merged 1 commit into
mainfrom
changeset

Conversation

@github-actions

Copy link
Copy Markdown

Every Text is now centred on its position, whichever constructor built it and
whichever style it is in — the way a sprite put at the same place is, and the way
everything in a Scratch project is placed. Only new Text() used to be centred:
new Text(words, x, y, width) and the framed styles sat to the left of their
position instead, so the same words moved sideways depending on how they had been
created, and the browser port drew them somewhere else again.

The texts the library builds for itself keep the edge they are anchored by and
now say so where they are built: the stage's display() and ask() bands reach
from side to side, and a sprite's speech bubble hangs off the tail in its bottom
left corner.

Add setAlign(TextAlign.LEFT) to text that was relying on starting at its
position rather than being centred on it.

The box Stage.ask() puts the question in now reaches from one side of the
stage to the other and squares off the two corners sitting on the bottom edge,
the way the band display() writes into already did. It used to be only as wide
as the longest line it happened to hold, and it curved away at the bottom where
the stage ends.

Fix the Stage.ask() Javadoc, which said the question box appears at the top of
the stage. It appears at the bottom, where Scratch puts it too.

@mikebarkmin
mikebarkmin merged commit 81abd80 into main Jul 29, 2026
@github-actions
github-actions Bot deleted the changeset branch July 29, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant