Complete menu navigation

This commit is contained in:
VAILLANT Jeremy
2021-05-08 13:44:51 +02:00
parent 4bd3daa747
commit b683302b2b
4 changed files with 38 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
extends Control
func _on_Return_pressed():
get_tree().change_scene("res://scenes/main.tscn")
func _on_WarCraft_pressed():
get_tree().change_scene("res://scenes/levels/WarCraft.tscn")
+25 -1
View File
@@ -1,8 +1,32 @@
[gd_scene format=2]
[gd_scene load_steps=2 format=2]
[ext_resource path="res://scenes/UI/ChooseScene.gd" type="Script" id=1]
[node name="ChooseScene" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GridContainer" type="GridContainer" parent="."]
margin_right = 1024.0
margin_bottom = 600.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Return" type="LinkButton" parent="GridContainer"]
margin_right = 54.0
margin_bottom = 14.0
text = "back"
[node name="WarCraft" type="LinkButton" parent="GridContainer"]
margin_top = 18.0
margin_right = 54.0
margin_bottom = 32.0
text = "WarCraft"
[connection signal="pressed" from="GridContainer/Return" to="." method="_on_Return_pressed"]
[connection signal="pressed" from="GridContainer/WarCraft" to="." method="_on_WarCraft_pressed"]