Complete menu navigation
This commit is contained in:
@@ -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")
|
||||
@@ -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"]
|
||||
|
||||
@@ -7,3 +7,7 @@ func _on_Quit_pressed():
|
||||
# Load scene about
|
||||
func _on_About_pressed():
|
||||
get_tree().change_scene("res://scenes/UI/About.tscn")
|
||||
|
||||
# Load scene for select game
|
||||
func _on_New_pressed():
|
||||
get_tree().change_scene("res://scenes/UI/ChooseScene.tscn")
|
||||
|
||||
@@ -36,6 +36,7 @@ text = "Nouveau"
|
||||
margin_top = 36.0
|
||||
margin_right = 151.0
|
||||
margin_bottom = 50.0
|
||||
disabled = true
|
||||
text = "Reprendre"
|
||||
|
||||
[node name="About" type="LinkButton" parent="Grid"]
|
||||
@@ -51,5 +52,6 @@ margin_bottom = 86.0
|
||||
text = "Quitter"
|
||||
script = SubResource( 1 )
|
||||
|
||||
[connection signal="pressed" from="Grid/New" to="." method="_on_New_pressed"]
|
||||
[connection signal="pressed" from="Grid/About" to="." method="_on_About_pressed"]
|
||||
[connection signal="pressed" from="Grid/Quit" to="." method="_on_Quit_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user