Added broken main menu
This commit is contained in:
parent
6cb10041fb
commit
add1047253
4 changed files with 58 additions and 1 deletions
|
@ -19,6 +19,10 @@ config/icon="res://icon.svg"
|
|||
|
||||
window/size/mode=3
|
||||
|
||||
[editor]
|
||||
|
||||
export/convert_text_resources_to_binary=true
|
||||
|
||||
[input]
|
||||
|
||||
player_left={
|
||||
|
|
36
scenes/mainmenu.tscn
Normal file
36
scenes/mainmenu.tscn
Normal file
|
@ -0,0 +1,36 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://dtvtu8w6b5es0"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/mainmenu.gd" id="1_w5lhm"]
|
||||
|
||||
[node name="mainmenu" 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_w5lhm")
|
||||
|
||||
[node name="Button" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 494.0
|
||||
offset_top = 196.0
|
||||
offset_right = 685.0
|
||||
offset_bottom = 259.0
|
||||
text = "PLAY"
|
||||
|
||||
[node name="Button2" type="Button" parent="."]
|
||||
offset_left = 496.0
|
||||
offset_top = 279.0
|
||||
offset_right = 687.0
|
||||
offset_bottom = 342.0
|
||||
text = "SETTINGS"
|
||||
|
||||
[node name="Button3" type="Button" parent="."]
|
||||
offset_left = 495.0
|
||||
offset_top = 358.0
|
||||
offset_right = 686.0
|
||||
offset_bottom = 421.0
|
||||
text = "EXIT"
|
||||
|
||||
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
|
|
@ -21,7 +21,7 @@ glow_enabled = true
|
|||
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_qgsp1"]
|
||||
data = PackedVector3Array(1, 0, 1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0, -1, 1, 0, -1)
|
||||
|
||||
[node name="Node3D" type="Node3D"]
|
||||
[node name="Playground" type="Node3D"]
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_fnphj")
|
||||
|
|
17
scripts/mainmenu.gd
Normal file
17
scripts/mainmenu.gd
Normal file
|
@ -0,0 +1,17 @@
|
|||
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_button_pressed():
|
||||
get_node("/root/Playground").free()
|
||||
var scene_trs =load("res://scenes/playground.tscn")
|
||||
var scene=scene_trs.instantiate()
|
||||
add_child(scene)
|
Loading…
Add table
Reference in a new issue