main menu fixes

This commit is contained in:
2026-01-24 06:12:15 +01:00
parent 0a6a2317bf
commit ed1edb2010
4 changed files with 66 additions and 30 deletions

View File

@@ -97,25 +97,34 @@ grow_horizontal = 2
grow_vertical = 2
color = Color(0, 1, 0, 1)
[node name="Label" type="Label" parent="Ui/Win"]
[node name="MarginContainer" type="MarginContainer" parent="Ui/Win"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -11.5
offset_right = 20.0
offset_bottom = 11.5
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 32
theme_override_constants/margin_top = 32
theme_override_constants/margin_right = 32
theme_override_constants/margin_bottom = 32
[node name="VBoxContainer" type="VBoxContainer" parent="Ui/Win/MarginContainer"]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="Ui/Win/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 72
text = "Light Weight"
horizontal_alignment = 1
vertical_alignment = 1
uppercase = true
[node name="Next day" type="Button" parent="Ui/Win/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Next day"
[node name="Lose" type="ColorRect" parent="Ui"]
visible = false
anchors_preset = 15
@@ -125,23 +134,40 @@ grow_horizontal = 2
grow_vertical = 2
color = Color(1, 0, 0, 1)
[node name="Label" type="Label" parent="Ui/Lose"]
[node name="MarginContainer" type="MarginContainer" parent="Ui/Lose"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -11.5
offset_right = 20.0
offset_bottom = 11.5
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 32
theme_override_constants/margin_top = 32
theme_override_constants/margin_right = 32
theme_override_constants/margin_bottom = 32
[node name="VBoxContainer" type="VBoxContainer" parent="Ui/Lose/MarginContainer"]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="Ui/Lose/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 72
text = "Failure"
horizontal_alignment = 1
vertical_alignment = 1
uppercase = true
[node name="Restart" type="Button" parent="Ui/Lose/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Restart"
[node name="Menu" type="Button" parent="Ui/Lose/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Go to menu"
[node name="Camera2D" type="Camera2D" parent="."]
[connection signal="pressed" from="Ui/Win/MarginContainer/VBoxContainer/Next day" to="Systems/GameManager" method="on_next_day_pressed"]
[connection signal="pressed" from="Ui/Lose/MarginContainer/VBoxContainer/Restart" to="Systems/GameManager" method="on_retry_pressed"]
[connection signal="pressed" from="Ui/Lose/MarginContainer/VBoxContainer/Menu" to="Systems/GameManager" method="on_menu_pressed"]

View File

@@ -1,9 +1,7 @@
[gd_scene load_steps=2 format=3 uid="uid://bg4uaukekjbx"]
[ext_resource type="PackedScene" uid="uid://xtm08af0e82g" path="res://Scenes/main.tscn" id="1_28flt"]
[gd_scene format=3 uid="uid://bg4uaukekjbx"]
[node name="MainMenu" type="MainMenu" node_paths=PackedStringArray("mute_button")]
game_scene = ExtResource("1_28flt")
game_scene_path = "res://Scenes/main.tscn"
mute_button = NodePath("VBoxContainer/MuteButton")
anchors_preset = 15
anchor_right = 1.0
@@ -60,3 +58,4 @@ text = "Mute"
[connection signal="pressed" from="VBoxContainer/PlayButton" to="." method="on_play_pressed"]
[connection signal="pressed" from="VBoxContainer/QuitButton" to="." method="on_quit_pressed"]
[connection signal="toggled" from="VBoxContainer/MuteButton" to="." method="on_mute_toggled"]