add main menu

This commit is contained in:
Fabio 2024-08-17 01:28:23 +02:00
parent 13c5b5f074
commit 18e144e81d
4 changed files with 116 additions and 0 deletions

View file

@ -0,0 +1,18 @@
[gd_scene load_steps=3 format=3 uid="uid://cscsuljo8ivad"]
[ext_resource type="Script" path="res://control.gd" id="1_demfw"]
[ext_resource type="PackedScene" uid="uid://cxbalfjqtp06t" path="res://canvas_layer.tscn" id="2_jr3s0"]
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("1_demfw")
[node name="Label" type="Label" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 23.0
[node name="CanvasLayer" parent="." instance=ExtResource("2_jr3s0")]

View file

@ -0,0 +1,34 @@
[gd_scene load_steps=2 format=3 uid="uid://cscsuljo8ivad"]
[ext_resource type="Script" path="res://control.gd" id="1_demfw"]
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("1_demfw")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
offset_right = 70.0
offset_bottom = 101.0
[node name="Label" type="Label" parent="VBoxContainer"]
layout_mode = 2
[node name="start" type="Button" parent="VBoxContainer"]
layout_mode = 2
text = ">start"
[node name="credits" type="Button" parent="VBoxContainer"]
layout_mode = 2
text = ">credits"
[node name="quit" type="Button" parent="VBoxContainer"]
layout_mode = 2
text = ">quit"
[connection signal="pressed" from="VBoxContainer/start" to="." method="_on_start_button_pressed"]
[connection signal="pressed" from="VBoxContainer/credits" to="." method="_on_credits_button_pressed"]
[connection signal="pressed" from="VBoxContainer/quit" to="." method="_on_quit_button_pressed"]