Material Box

Material Box

WEB Design & Material Images

Godot - How to underline text in RichTextLabel

Godot

This is an example of how to underline text in a RichTextLabel node using BBCode in GDScript.
This method is not available for Label nodes.


Enables the `bbcode_enabled` property.
Wraps the text to underline in the `[u]` tag.

var label = RichTextLabel.new()
add_child(label)
label.global_position = Vector2(0, 0)
label.size = Vector2(200,200)

# Make the text underlined
label.bbcode_enabled = true
label.text = "[u]UnderLlne Text[/u]"

Godot

TitleGodot - How to underline text in RichTextLabel

CategoryGodot

Created

Update

AuthorYousuke.U