Start menu
This commit is contained in:
parent
0f5e075a54
commit
f272b7b433
|
@ -0,0 +1,41 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://StarMenu.gd" type="Script" id=1]
|
||||
|
||||
[node name="StarMenu" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
|
||||
margin_left = 119.0
|
||||
margin_top = 56.0
|
||||
margin_right = 201.0
|
||||
margin_bottom = 124.0
|
||||
|
||||
[node name="StartButton" type="Button" parent="CenterContainer/VBoxContainer"]
|
||||
margin_right = 82.0
|
||||
margin_bottom = 20.0
|
||||
text = "New Game"
|
||||
|
||||
[node name="LoadButton" type="Button" parent="CenterContainer/VBoxContainer"]
|
||||
margin_top = 24.0
|
||||
margin_right = 82.0
|
||||
margin_bottom = 44.0
|
||||
text = "Load game"
|
||||
|
||||
[node name="QuitButton" type="Button" parent="CenterContainer/VBoxContainer"]
|
||||
margin_top = 48.0
|
||||
margin_right = 82.0
|
||||
margin_bottom = 68.0
|
||||
text = "Quit"
|
||||
[connection signal="pressed" from="CenterContainer/VBoxContainer/StartButton" to="." method="_on_StartButton_pressed"]
|
||||
[connection signal="pressed" from="CenterContainer/VBoxContainer/LoadButton" to="." method="_on_LoadButton_pressed"]
|
||||
[connection signal="pressed" from="CenterContainer/VBoxContainer/QuitButton" to="." method="_on_QuitButton_pressed"]
|
|
@ -0,0 +1,14 @@
|
|||
extends Control
|
||||
|
||||
func _ready():
|
||||
VisualServer.set_default_clear_color(Color.black)
|
||||
|
||||
func _on_StartButton_pressed():
|
||||
get_tree().change_scene("res://Scenes/World/World.tscn")
|
||||
|
||||
func _on_LoadButton_pressed():
|
||||
# TODO: Savegames
|
||||
pass
|
||||
|
||||
func _on_QuitButton_pressed():
|
||||
get_tree().quit()
|
|
@ -21,7 +21,7 @@ _global_script_class_icons={
|
|||
[application]
|
||||
|
||||
config/name="Metroidvania"
|
||||
run/main_scene="res://Scenes/World/World.tscn"
|
||||
run/main_scene="res://Scenes/UI/StarMenu.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
|
Loading…
Reference in New Issue