diff options
author | Logan <logan@cflip.net> | 2023-01-30 16:43:23 -0700 |
---|---|---|
committer | Logan <logan@cflip.net> | 2023-01-30 16:43:23 -0700 |
commit | 9ebeb1c836deb561f53b49f004d95a685dec6880 (patch) | |
tree | d2f80be0a1788b7f24ac28729aae97d564ab0c09 | |
parent | f23666be65e969ec54c51fdb871ab8d3611580c2 (diff) |
Added mainmenu
-rw-r--r-- | scenes/mainmenu.tscn | 83 | ||||
-rw-r--r-- | scripts/mainmenu.gd | 23 |
2 files changed, 106 insertions, 0 deletions
diff --git a/scenes/mainmenu.tscn b/scenes/mainmenu.tscn new file mode 100644 index 0000000..3c77f01 --- /dev/null +++ b/scenes/mainmenu.tscn @@ -0,0 +1,83 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://scripts/mainmenu.gd" type="Script" id=1] + +[node name="Menu" type="Control"] +margin_right = 214.0 +margin_bottom = 120.0 +script = ExtResource( 1 ) + +[node name="ColorRect" type="ColorRect" parent="."] +margin_right = 214.0 +margin_bottom = 120.0 +color = Color( 0, 0, 0, 1 ) + +[node name="Label" type="Label" parent="."] +anchor_left = 0.5 +anchor_right = 0.5 +margin_left = -48.0 +margin_right = 48.0 +margin_bottom = 16.0 +custom_colors/font_color_shadow = Color( 0.894118, 0.313726, 0, 1 ) +text = "BasketBALLAZ" + +[node name="Control" type="Control" parent="."] +margin_right = 428.0 +margin_bottom = 240.0 +rect_scale = Vector2( 0.5, 0.5 ) + +[node name="VBoxContainer" type="VBoxContainer" parent="Control"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -50.0 +margin_top = -76.0 +margin_right = 50.0 +margin_bottom = 76.0 + +[node name="StartButton" type="Button" parent="Control/VBoxContainer"] +margin_right = 100.0 +margin_bottom = 22.0 +text = "Start" + +[node name="LeaderboardButton" type="Button" parent="Control/VBoxContainer"] +margin_top = 26.0 +margin_right = 100.0 +margin_bottom = 48.0 +disabled = true +text = "Leaderboard" + +[node name="HelpButton" type="Button" parent="Control/VBoxContainer"] +margin_top = 52.0 +margin_right = 100.0 +margin_bottom = 74.0 +disabled = true +text = "Help" + +[node name="OptionsButton" type="Button" parent="Control/VBoxContainer"] +margin_top = 78.0 +margin_right = 100.0 +margin_bottom = 100.0 +disabled = true +text = "Options" + +[node name="CreditsButton" type="Button" parent="Control/VBoxContainer"] +margin_top = 104.0 +margin_right = 100.0 +margin_bottom = 126.0 +disabled = true +text = "Credits" + +[node name="QuitButton" type="Button" parent="Control/VBoxContainer"] +margin_top = 130.0 +margin_right = 100.0 +margin_bottom = 152.0 +text = "Quit" + +[connection signal="pressed" from="Control/VBoxContainer/StartButton" to="." method="_on_StartButton_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/LeaderboardButton" to="." method="_on_LeaderboardButton_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/HelpButton" to="." method="_on_HelpButton_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/OptionsButton" to="." method="_on_OptionsButton_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/CreditsButton" to="." method="_on_CreditsButton_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/QuitButton" to="." method="_on_QuitButton_pressed"] diff --git a/scripts/mainmenu.gd b/scripts/mainmenu.gd new file mode 100644 index 0000000..e07b88f --- /dev/null +++ b/scripts/mainmenu.gd @@ -0,0 +1,23 @@ +extends Control + +func _ready(): + pass + + +func _on_StartButton_pressed(): + get_tree().change_scene("res://scenes/level.tscn") + +func _on_LeaderboardButton_pressed(): + pass # Replace with function body. + +func _on_HelpButton_pressed(): + pass # Replace with function body. + +func _on_OptionsButton_pressed(): + pass # Replace with function body. + +func _on_CreditsButton_pressed(): + pass # Replace with function body. + +func _on_QuitButton_pressed(): + get_tree().quit() |