0 votes

I would like to use RichTextLabel from a constructor of a dialog.

I tried many combinations, for example:

RichTextLabel *lbl = memnew(RichTextLabel);
container->add_child(lbl);
lbl->set_bbcode("Something with [color=aqua]color[/color]");

However no text shows at all.

I can see that there is a check for isinsidetree in set_bbcode.
Can someone elaborate?

asked Jan 12 in Engine by StateOff (21 points)

As BBCode is not enabled in RichTextLabels by default, you need to set its bbcode_enabled property to true. This is a bit strange, but that's how it is.

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.