From fdbba87b346c6020d7349d0c2cb3793fcdab25f3 Mon Sep 17 00:00:00 2001 From: cel Date: Sat, 16 Jul 2022 22:42:19 +0100 Subject: add menu and switch die code from rust to gdscript --- godot/scenes/Menu.tscn | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 godot/scenes/Menu.tscn (limited to 'godot/scenes/Menu.tscn') diff --git a/godot/scenes/Menu.tscn b/godot/scenes/Menu.tscn new file mode 100644 index 0000000..5529448 --- /dev/null +++ b/godot/scenes/Menu.tscn @@ -0,0 +1,42 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://assets/theme.tres" type="Theme" id=1] +[ext_resource path="res://scenes/Menu.gd" type="Script" id=2] + +[node name="Menu" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 2 ) + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +anchor_right = 0.25 +anchor_bottom = 1.0 +margin_left = 40.0 +margin_top = 789.0 +margin_bottom = -40.0 +theme = ExtResource( 1 ) +alignment = 2 + +[node name="StartButton" type="Button" parent="VBoxContainer"] +margin_top = 85.0 +margin_right = 440.0 +margin_bottom = 166.0 +focus_neighbour_top = NodePath("../QuitButton") +text = "Start" + +[node name="LevelButton" type="Button" parent="VBoxContainer"] +visible = false +margin_top = 85.0 +margin_right = 440.0 +margin_bottom = 166.0 +text = "Levels" + +[node name="QuitButton" type="Button" parent="VBoxContainer"] +margin_top = 170.0 +margin_right = 440.0 +margin_bottom = 251.0 +focus_neighbour_bottom = NodePath("../StartButton") +text = "Quit" + +[connection signal="pressed" from="VBoxContainer/StartButton" to="." method="_on_StartButton_pressed"] +[connection signal="pressed" from="VBoxContainer/QuitButton" to="." method="_on_QuitButton_pressed"] -- cgit