Material Box

Material Box

WEBデザイン & フリー素材

Godot - Labelテキストの行間を変更する

Godot

GDScriptでLabelテキストの行間を変更するコード例です。


add_theme_constant_override()で「line_spacing」プロパティを指定する事で複数行あるテキストの行間を変更できます。

var label = Label.new()
add_child(label)

# テキストの行間
label.add_theme_constant_override("line_spacing", 50)

Godot

TitleGodot - Labelテキストの行間を変更する

CategoryGodot

Created

Update

AuthorYousuke.U