From 601bc649ddd44da9d6359dde5f4374f297631955 Mon Sep 17 00:00:00 2001 From: Vaillant Jeremy Date: Sat, 16 May 2026 21:08:54 +0200 Subject: [PATCH] Center menu button labels: clear stale Main.tscn overrides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- scenes/Main.tscn | 16 ---------------- scenes/UI/summary/Summary.tscn | 20 ++++++++++++-------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/scenes/Main.tscn b/scenes/Main.tscn index 4116c59..59dcb82 100644 --- a/scenes/Main.tscn +++ b/scenes/Main.tscn @@ -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 diff --git a/scenes/UI/summary/Summary.tscn b/scenes/UI/summary/Summary.tscn index ca9a8d7..9da11e2 100644 --- a/scenes/UI/summary/Summary.tscn +++ b/scenes/UI/summary/Summary.tscn @@ -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