Link about scenes

This commit is contained in:
VAILLANT Jeremy
2021-05-08 13:22:37 +02:00
parent e164cef2c2
commit 4bd3daa747
4 changed files with 49 additions and 5 deletions
+9
View File
@@ -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")
+33 -4
View File
@@ -1,8 +1,37 @@
[gd_scene format=2] [gd_scene load_steps=2 format=2]
[node name="About" type="Control"] [ext_resource path="res://scenes/UI/About.gd" type="Script" id=1]
anchor_right = 1.0
anchor_bottom = 1.0 [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__ = { __meta__ = {
"_edit_use_anchors_": false "_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"]
+4
View File
@@ -3,3 +3,7 @@ extends Node
# Quit the game # Quit the game
func _on_Quit_pressed(): func _on_Quit_pressed():
get_tree().quit(0) get_tree().quit(0)
# Load scene about
func _on_About_pressed():
get_tree().change_scene("res://scenes/UI/About.tscn")
+3 -1
View File
@@ -5,7 +5,8 @@
[sub_resource type="GDScript" id=1] [sub_resource type="GDScript" id=1]
script/source = "extends LinkButton script/source = "extends LinkButton
# Quit the game with properly exit code" # Quit the game with properly exit code
"
[node name="Main" type="Node"] [node name="Main" type="Node"]
script = ExtResource( 1 ) script = ExtResource( 1 )
@@ -50,4 +51,5 @@ margin_bottom = 86.0
text = "Quitter" text = "Quitter"
script = SubResource( 1 ) 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"] [connection signal="pressed" from="Grid/Quit" to="." method="_on_Quit_pressed"]