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

[Label] Add support for tab stops. #76129

Merged
merged 1 commit into from
Jun 9, 2023
Merged

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Apr 16, 2023

Fixes #4327

@bruvzg bruvzg added this to the 4.x milestone Apr 16, 2023
@bruvzg bruvzg requested review from a team as code owners April 16, 2023 11:59
@adamscott
Copy link
Member

That's an old issue! Wow, 2016.

@@ -69,6 +69,9 @@
<member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
Set additional options for BiDi override.
</member>
<member name="tab_stops" type="PackedFloat32Array" setter="set_tab_stops" getter="get_tab_stops" default="PackedFloat32Array()">
Aligns text to the given tab-stops.
Copy link
Member

Choose a reason for hiding this comment

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

Could an example be shown using a codeblock? How many values should I add to the array in general?

Copy link
Member Author

Choose a reason for hiding this comment

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

One value for the const. width stops, or more for different width spacing (list is repeated). Not sure how to best describe it without an image.

Essentially, it's an equivalent of this list in the text editors:
Screenshot 2023-04-16 at 22 56 18

@akien-mga
Copy link
Member

Looks good overall, but is this a configurable feature in RichTextLabel too?
I don't see it right away and it seems a bit weird for Label to have a more advanced (and relatively niche) feature than RTL.

@bruvzg
Copy link
Member Author

bruvzg commented Apr 24, 2023

but is this a configurable feature in RichTextLabel too?

I was sure it is, but apparently it's not, RTL is using hard-coded tab size, I will do RTL PR as well.

@akien-mga
Copy link
Member

Needs rebase.

@akien-mga akien-mga merged commit b3f8159 into godotengine:master Jun 9, 2023
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga added the bug label Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

\t not worked for string in the Label
4 participants