Mennu!
This commit is contained in:
parent
5bb961576f
commit
4c4edb4bc0
47
Scenes/start_menu.tscn
Normal file
47
Scenes/start_menu.tscn
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://bkt0gdgv7bsx2"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://Scripts/start_menu.gd" id="1_dgae7"]
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_7r5ov"]
|
||||||
|
font_size = 69
|
||||||
|
|
||||||
|
[node name="StartMenu" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_dgae7")
|
||||||
|
|
||||||
|
[node name="Title" type="Label" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 272.0
|
||||||
|
offset_top = 94.0
|
||||||
|
offset_right = 922.0
|
||||||
|
offset_bottom = 388.0
|
||||||
|
text = "UNTITLED GAME
|
||||||
|
THAT MAY BE
|
||||||
|
ABOUT A MONSTER"
|
||||||
|
label_settings = SubResource("LabelSettings_7r5ov")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="StartButton" type="Button" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 420.0
|
||||||
|
offset_top = 442.0
|
||||||
|
offset_right = 558.0
|
||||||
|
offset_bottom = 489.0
|
||||||
|
text = "Start"
|
||||||
|
|
||||||
|
[node name="QuitButton" type="Button" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 570.0
|
||||||
|
offset_top = 442.0
|
||||||
|
offset_right = 714.0
|
||||||
|
offset_bottom = 489.0
|
||||||
|
text = "Quit
|
||||||
|
"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="StartButton" to="." method="_on_start_button_pressed"]
|
||||||
|
[connection signal="pressed" from="QuitButton" to="." method="_on_quit_button_pressed"]
|
11
Scripts/StartButton.gd
Normal file
11
Scripts/StartButton.gd
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
extends Button
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
pass
|
19
Scripts/start_menu.gd
Normal file
19
Scripts/start_menu.gd
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
extends Control
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func _on_start_button_pressed():
|
||||||
|
get_tree().change_scene("res://Scenes/level1.tscn")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_quit_button_pressed():
|
||||||
|
get_tree().quit()
|
@ -11,6 +11,7 @@ config_version=5
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="GameJam-A23"
|
config/name="GameJam-A23"
|
||||||
|
run/main_scene="res://Scenes/start_menu.tscn"
|
||||||
config/features=PackedStringArray("4.1", "GL Compatibility")
|
config/features=PackedStringArray("4.1", "GL Compatibility")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user