Skip to content

Sign post: Wrap long lines - #2891

Merged
wjt merged 4 commits into
mainfrom
signposts-wrap-lines
Sep 15, 2026
Merged

wjt merged 4 commits into
mainfrom
signposts-wrap-lines

Conversation

@manuq

@manuq manuq commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Give the label a maximum horizontal size of 300, and keep -1 for the maximum
vertical size. Also change autowrap mode to "Words", and reset vertical and
alignment to the default (top).

Give the LabelContainer (the first Control node) a custom minimum size of 320 x
32. This is in the X axis, the max size of the label plus the horizontal margins
(10 on each side). And on the Y axis, the size of a line of text plus the
vertical margins (5 on each side). And to allow smaller sizes (for example a
signpost saying "Go!"), set the horizontal container sizing of the
PanelContainer child to Shrink Center.

Dev Basics: Remove line breaks from text in signposts

As a test of how this looks, before changing all of it in batch.

Update Spanish translation.

Fix #2843

Give the label a maximum horizontal size of 300, and keep -1 for the maximum
vertical size. Also change autowrap mode to "Words", and reset vertical and
alignment to the default (top).

Give the LabelContainer (the first Control node) a custom minimum size of 320 x
32. This is in the X axis, the max size of the label plus the horizontal margins
(10 on each side). And on the Y axis, the size of a line of text plus the
vertical margins (5 on each side). And to allow smaller sizes (for example a
signpost saying "Go!"), set the horizontal container sizing of the
PanelContainer child to Shrink Center.
As a test of how this looks, before changing all of it in batch.
This was making the signpost panel look odd.
@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/signposts-wrap-lines/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

direction = 1
text = "Go!
"
text = "Go!"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes this bug which can be seen before and after the changes in sign.tscn.

Image

@manuq

manuq commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author

Screenshots of a scene that has been updated (line breaks removed):

Before:

image

After:

image

Screenshots of a scene that hasn't been updated:

Before:

image

After:

image

@manuq
manuq marked this pull request as ready for review September 14, 2026 21:58
@manuq
manuq requested a review from a team as a code owner September 14, 2026 21:58

@wjt wjt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement!

If the message is really long then the label ends up obscuring the signpost. One way to solve this would be to make the label grow upwards. I think this could be done by adjusting the anchor/pivot position of the controls, though I tried and failed to make it work. However the real solution is “Don't do that”. For longer text, the sign could be made interactible and the text could be shown as dialogue.

@wjt
wjt merged commit 0d6193d into main Sep 15, 2026
7 checks passed
@wjt
wjt deleted the signposts-wrap-lines branch September 15, 2026 09:45
@manuq

manuq commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator Author

Nice improvement!

If the message is really long then the label ends up obscuring the signpost. One way to solve this would be to make the label grow upwards. I think this could be done by adjusting the anchor/pivot position of the controls, though I tried and failed to make it work. However the real solution is “Don't do that”. For longer text, the sign could be made interactible and the text could be shown as dialogue.

Good point! We can revisit the anchoring. I was even considering adding an InteractArea plus a TalkBehavior to signposts and use the dialogue bubble for displaying the text. Maybe we can consider further changes in the future, for now I wanted to unblock the Spanish translation of Dev Archipelago.

@manuq

manuq commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator Author

@wjt I took your suggestion in #2892

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.

Sign posts: Wrap lines correctly

2 participants