0 votes

Hi everyone,

only a couple of numbers and one comma can be entered into my RichTextLabel. It's bbcoded quite a bit (align right, change color at a certain number of digits, some offset for the first digit and such things...). There are several different bbcode-templates kicking in on different occasions.

Now I want that comma to have an extra offset, so I wonder if it's possible to apply bbcode to an already bbcoded text, as "layering another bbcode on top", or "have two bbcodes running on the same thing simultaneously". Because adding some extra comma-offset into each of the templates seems unpractical to me.

I'm thinking about something like

var templateCommaHigher = "[offset x=0 y=15]{CommaHigher}[/offset]"
var comma = text.find(",")
if comma:
    bbcode_text.comma = templateCommaHigher.format({ "commaHigher" : text })

so this addresses only the comma no matter which other template is already on. Is that possible?

Godot version 3.2.3
in Engine by (365 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.