【发布时间】:2019-02-14 05:06:28
【问题描述】:
我刚刚创建了一个新的 Godot 项目并创建了一个带有文本的标签。即使使用 Align: center 在我运行游戏时文本仍保持在左上角。
标签.tscn
[gd_scene format=2]
[node name="Label" type="Label" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 40.0
margin_bottom = 14.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
text = "heylab"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "Anchor" ]
【问题讨论】:
-
请发布您的 .tscn 文件(只是场景的minimal 版本)。
-
好吧,我添加了它编辑:好的,我刚刚添加了 100 的左边距和上边距,并且能够移动文本哈哈仍然没有居中,但是嗯
标签: user-interface godot