Material Box

Material Box

WEBデザイン & フリー素材

Godot - RichTextLabelのテキストに下線を引く

Godot

GDScriptでBBCodeを利用してRichTextLabelノードのテキストに下線を引くコード例です。
この方法はLabelノードでは利用できません。


「bbcode_enabled」プロパティを有効にします。
下線を引きたいテキストを[u]タグで囲います。

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

# RichTextLabelのテキストに下線を引く
label.bbcode_enabled = true
label.text = "[u]UnderLlne Text[/u]"

Godot

TitleGodot - RichTextLabelのテキストに下線を引く

CategoryGodot

Created

Update

AuthorYousuke.U