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
|
||||
|
||||
Reference in New Issue
Block a user