Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[center] and [right] bbcode align tags in RichTextLabel causes text to overlap itself #38846

Closed
Tracked by #39144
gubblesdev opened this issue May 19, 2020 · 3 comments · Fixed by #39164
Closed
Tracked by #39144
Milestone

Comments

@gubblesdev
Copy link

gubblesdev commented May 19, 2020

Godot version: 3.2.1 (stable release)

OS/device including version: Windows 10 Pro Version 1809 (build 17763.1217)

Issue description:
When using either the [center] or [right] align tags in a RichTextLabel, it will sometimes cause the last line to overlap the previous one under certain conditions. Both the length of the bbcode text string (after tags are parsed) and the size of the Rect are variables in causing this to happen. Additionally, the two tags do not act like their alignment counterparts in a regular Label, as seen in the attached screenshot:

richtextlabel overlap bug

RichTextLabel on the left, plain Label on the right. Along with the overlapping issue, the RichTextLabel [center] is not a true center as displayed in the regular Label; it appears to be left aligned and simply shifted toward the middle.

Steps to reproduce:
-Create a RichTextLabel
-Enable BB Code
-In the BB Code Text field, type a string preceded by either the [center] or [right] tag
-Adjust the size of the Rect until the displayed text overlaps itself

Minimal reproduction project:
RichTextLabel Overlap Bug.zip

@akien-mga
Copy link
Member

Can you test with 3.2.2 beta 2? https://godotengine.org/article/dev-snapshot-godot-3-2-2-beta-2

@gubblesdev
Copy link
Author

Can you test with 3.2.2 beta 2? https://godotengine.org/article/dev-snapshot-godot-3-2-2-beta-2

Tested with v3.2.2 beta 2, and it looks exactly the same; not seeing any improvements or changes from v3.2.1

@theoway
Copy link
Contributor

theoway commented May 29, 2020

Found the bug, will be making a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants