Create main menu scene
This commit is contained in:
parent
b6856dd3f2
commit
8630c79543
97
scenes/main_menu.tscn
Normal file
97
scenes/main_menu.tscn
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
[gd_scene format=3 uid="uid://bluq6da7tku3d"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cj37ns1ahfvhr" path="res://scripts/main_menu.gd" id="1_ekxnf"]
|
||||
[ext_resource type="Script" uid="uid://7hglx6nfu063" path="res://addons/controller_icons/objects/ControllerIconTexture.gd" id="2_bqqt6"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_bqqt6"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ekxnf"]
|
||||
|
||||
[sub_resource type="Texture2D" id="Texture2D_wu84c"]
|
||||
resource_local_to_scene = false
|
||||
resource_name = ""
|
||||
script = ExtResource("2_bqqt6")
|
||||
path = "ui_accept"
|
||||
metadata/_custom_type_script = "uid://7hglx6nfu063"
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_3agn1"]
|
||||
font_size = 64
|
||||
|
||||
[node name="MainMenu" type="Control" unique_id=1471802333]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_ekxnf")
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=1404024715]
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -571.0
|
||||
offset_top = -323.5
|
||||
offset_bottom = 323.5
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1437260283]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -130.0
|
||||
offset_top = -67.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
theme_override_constants/margin_right = 200
|
||||
theme_override_constants/margin_bottom = 150
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer" unique_id=212717997]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="MarginContainer/VBoxContainer" unique_id=455366583]
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_bqqt6")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/PanelContainer" unique_id=980574030]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Start" type="Button" parent="MarginContainer/VBoxContainer/PanelContainer/HBoxContainer" unique_id=1823965781]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_ekxnf")
|
||||
text = "Appuyer sur"
|
||||
flat = true
|
||||
icon_alignment = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer/VBoxContainer/PanelContainer/HBoxContainer" unique_id=544893863]
|
||||
custom_minimum_size = Vector2(40, 40)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
texture = SubResource("Texture2D_wu84c")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=745232782]
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -489.0
|
||||
offset_top = -185.0
|
||||
offset_right = -45.0
|
||||
offset_bottom = -97.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
text = "Tales of PKMN"
|
||||
label_settings = SubResource("LabelSettings_3agn1")
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/PanelContainer/HBoxContainer/Start" to="." method="_on_start_pressed"]
|
||||
18
scripts/main_menu.gd
Normal file
18
scripts/main_menu.gd
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
extends Node
|
||||
|
||||
@onready var Start: Button = %Start
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
Start.grab_focus()
|
||||
pass
|
||||
|
||||
|
||||
func _on_start_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://scenes/main.tscn")
|
||||
pass # Replace with function body.
|
||||
1
scripts/main_menu.gd.uid
Normal file
1
scripts/main_menu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cj37ns1ahfvhr
|
||||
Loading…
Reference in a new issue