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 "fade" offsets from start of string rather than start of command #93700

Closed
cariad opened this issue Jun 28, 2024 · 0 comments · Fixed by #93721
Closed

RichTextLabel's "fade" offsets from start of string rather than start of command #93700

cariad opened this issue Jun 28, 2024 · 0 comments · Fixed by #93721
Milestone

Comments

@cariad
Copy link
Contributor

cariad commented Jun 28, 2024

Tested versions

  • Reproducible in v4.2.2.stable.official [15073af]

System information

Godot v4.2.2.stable - macOS 14.5.0 - GLES3 (Compatibility) - Apple M2 Max - Apple M2 Max (12 Threads)

Issue description

The documentation says the RichTextLabel's fade BBCode command counts the start offset from the command's position:

start controls the starting position of the falloff relative to where the fade command is inserted (https://docs.godotengine.org/en/4.2/tutorials/ui/bbcode_in_richtextlabel.html)

…but I believe the label actually uses the absolute position within the entire string.

Steps to reproduce

  1. Create a RichTextLabel.
  2. Enable BBCode and set the text to:
0123456[fade start=3 length=6]abcdefg[/fade]
Screenshot 2024-06-28 at 14 08 51

I believe the label should show "0123456abc" in bright text and subsequent characters should fade from bright to dark, because I believe the "start" index of "3" should start counting from "a".

In reality, the faded "ab" implies that the "start" is being counted from the beginning of the string.

Minimal reproduction project (MRP)

N/A

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.

3 participants