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

RichTextLabel's [center] and [right] are still broken #34308

Closed
Tracked by #39144
ghost opened this issue Dec 12, 2019 · 7 comments
Closed
Tracked by #39144

RichTextLabel's [center] and [right] are still broken #34308

ghost opened this issue Dec 12, 2019 · 7 comments

Comments

@ghost
Copy link

ghost commented Dec 12, 2019

Godot version:
269145a
OS/device including version:
ArcoLinux
Issue description:
There seems to be a misconception in what's expected of RichTextLabel's [center] and [right] tags. When the user attempts to center-align their text, for example, what they're looking for is precisely what Godot's label does:
godotlabel

This expectation is also supported by this BBCode tester https://infinite-story.com/tools/bbcode.php
infinite-story

When the RTL centers text, however, it winds up looking like this:
godot

It centers the entire block of text to the middle of the control, but doesn't actually center-align. The user wants to center-align, not center the entire contents.

[right] also suffers this same issue:
image

[right]This is a test. This is only a test.  This is a test. This is only a test.  This is a test. This is only a test.  This is a test. This is only a test.  This is a test. This is only a test.  This is a test. This is only a test.[/right]

For contrast, here's what the BBCode tester outputs:
image

According to #29785 , #6982 is fixed, but it seems to fix a problem that doesn't actually exist, or missed the point of the issue being raised. The tags are expected to center-align and right-align the text itself, just like Label, and just like the BBCode tester, not shift the entire contents towards the center or the right while keeping the text alignment left.

@TheDuriel
Copy link
Contributor

possibly related to #31089 and #30632 and #27896 and #24570 and #24305

so yeah, someone plz nuke this node and rewrite it :D

@Capital-EX
Copy link

Chiming in to say that this is still an issue with 3.2. It seems like Godot doesn't properly handle line wrapping:
image

Hopefully this will be fixed one day, especially since Godot recently added text effect to the RTL node. But, in its current state, it is unusable.

@Nolkaloid
Copy link
Contributor

If I try to nuke it and rewrite it, do we care about backwards compatibility? Or should I just try to patch it here and there UwU?

@Janglee123
Copy link
Contributor

@Nolkaloid I think for 4.0, there are already lots of changes to break compatibility. But for 3.2, patches should be better.

@Poobslag
Copy link

Poobslag commented Apr 16, 2020

Godot 3.2 still has problems with wrapping centered text, including this weird edge-case where it overlaps itself. The RichTextArea is tall enough to accommodate four rows of text, and additional rows cause a scroll bar. But, sometimes the textarea will just plop a word on top of other words.

@Anutrix
Copy link
Contributor

Anutrix commented Jun 4, 2020

Can we close this if it's fixed by #39164?

@Calinou
Copy link
Member

Calinou commented Jun 4, 2020

This bug was confirmed to be fixed by @pouleyKetchoupp in #39164 (comment), closing.

@Calinou Calinou closed this as completed Jun 4, 2020
@Calinou Calinou added this to the 4.0 milestone Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants