diff --git a/scenes/UI/About.gd b/scenes/UI/About.gd new file mode 100644 index 0000000..7340780 --- /dev/null +++ b/scenes/UI/About.gd @@ -0,0 +1,9 @@ +extends Node + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +func _on_Return_pressed(): + get_tree().change_scene("res://scenes/main.tscn") diff --git a/scenes/UI/About.tscn b/scenes/UI/About.tscn index c56b556..6ced9c2 100644 --- a/scenes/UI/About.tscn +++ b/scenes/UI/About.tscn @@ -1,8 +1,37 @@ -[gd_scene format=2] +[gd_scene load_steps=2 format=2] -[node name="About" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 +[ext_resource path="res://scenes/UI/About.gd" type="Script" id=1] + +[node name="About" type="Node"] +script = ExtResource( 1 ) + +[node name="GRem" type="Label" parent="."] +margin_left = 150.0 +margin_top = 150.0 +margin_right = 416.0 +margin_bottom = 181.0 +text = "Lead Develop : GRem -- VAILLANT Jérémy +" __meta__ = { "_edit_use_anchors_": false } + +[node name="Stilobique" type="Label" parent="."] +margin_left = 300.0 +margin_top = 300.0 +margin_right = 583.0 +margin_bottom = 331.0 +text = "Lead Artist : Stilobique -- VAILLANT Aurelien" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Return" type="LinkButton" parent="."] +margin_right = 40.0 +margin_bottom = 14.0 +text = "back" +__meta__ = { +"_edit_use_anchors_": false +} + +[connection signal="pressed" from="Return" to="." method="_on_Return_pressed"] diff --git a/scenes/main.gd b/scenes/main.gd index 8c33aee..87349b7 100644 --- a/scenes/main.gd +++ b/scenes/main.gd @@ -3,3 +3,7 @@ extends Node # Quit the game func _on_Quit_pressed(): get_tree().quit(0) + +# Load scene about +func _on_About_pressed(): + get_tree().change_scene("res://scenes/UI/About.tscn") diff --git a/scenes/main.tscn b/scenes/main.tscn index 9dbff2e..0b74a77 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -5,7 +5,8 @@ [sub_resource type="GDScript" id=1] script/source = "extends LinkButton -# Quit the game with properly exit code" +# Quit the game with properly exit code +" [node name="Main" type="Node"] script = ExtResource( 1 ) @@ -50,4 +51,5 @@ margin_bottom = 86.0 text = "Quitter" script = SubResource( 1 ) +[connection signal="pressed" from="Grid/About" to="." method="_on_About_pressed"] [connection signal="pressed" from="Grid/Quit" to="." method="_on_Quit_pressed"]