Center menu button labels: clear stale Main.tscn overrides
Summary.tscn was correctly set up (Label anchored to full button rect, horizontal/vertical_alignment = 1). But Main.tscn — which instances Summary.tscn as UI_summary — had per-Label overrides that reset the anchors back to 0 and shrunk the Label rect to 1x23 px (legacy from Godot 3 where margin-based positioning was the default), making the text render in the top-left 1 px corner. Drop the layout_mode=0 / anchor_right=0 / anchor_bottom=0 / offset_* overrides on each ButtonPuzzle/Setting/Credits/Quit Label so they inherit Summary.tscn's full-rect anchors and the centered alignment becomes visible. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -50,29 +50,16 @@ layout_mode = 2
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonPuzzle" index="0"]
|
||||
layout_mode = 0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
offset_right = 1.0
|
||||
offset_bottom = 23.0
|
||||
grow_horizontal = 1
|
||||
grow_vertical = 1
|
||||
|
||||
[node name="ButtonSetting" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="2"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonSetting" index="0"]
|
||||
layout_mode = 0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
|
||||
[node name="ButtonCredits" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="3"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonCredits" index="0"]
|
||||
layout_mode = 0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
|
||||
[node name="MarginContainer" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="4"]
|
||||
layout_mode = 2
|
||||
@@ -81,9 +68,6 @@ layout_mode = 2
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonQuit" index="0"]
|
||||
layout_mode = 0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
|
||||
[node name="ContainerVersion" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="6"]
|
||||
layout_mode = 2
|
||||
|
||||
@@ -228,21 +228,19 @@ __meta__ = {
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="PanelWood/VBoxContainer/ButtonPuzzle"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 7
|
||||
size_flags_vertical = 3
|
||||
offset_left = 0.0
|
||||
offset_top = 0.0
|
||||
offset_right = 0.0
|
||||
offset_bottom = 0.0
|
||||
theme_override_fonts/font = ExtResource( 4 )
|
||||
theme_override_font_sizes/font_size = 46
|
||||
text = "Puzzles"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false,
|
||||
"_editor_description_": ""
|
||||
}
|
||||
|
||||
[node name="ButtonSetting" type="TextureButton" parent="PanelWood/VBoxContainer"]
|
||||
offset_top = 408.0
|
||||
@@ -259,6 +257,8 @@ __meta__ = {
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="PanelWood/VBoxContainer/ButtonSetting"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 7
|
||||
@@ -289,6 +289,8 @@ __meta__ = {
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="PanelWood/VBoxContainer/ButtonCredits"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 7
|
||||
@@ -324,6 +326,8 @@ __meta__ = {
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="PanelWood/VBoxContainer/ButtonQuit"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 7
|
||||
|
||||
Reference in New Issue
Block a user