0 votes

Hi, I am able to create a label no problem:

in c#:
var label = new Label(); AddChild(label); label.text = "blah";

however when I try to setup a RichTextLabel the same way, nothing shows. I assume that there is some init like fonts I need to setup, but there doesn't seem to be a clear way to do so (and docs don't say)

in Engine by (220 points)

In the Control portion of the Rich Label you might be able to override the default font with add_font_override(). See the documentation for details.

1 Answer

0 votes

You have to set the size, for example:

var textLabel: RichTextLabel = RichTextLabel.new()
textLabel.rect_size = Vector2(400,400)
add_child(textLabel)
by (14 points)
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 Frequently asked questions and 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 [email protected] with your username.