mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-15 08:24:48 +00:00
🎉 initial commit
This commit is contained in:
commit
d02447c7e6
185 changed files with 8442 additions and 0 deletions
86
interfaces/menus/boot/boot.tscn
Normal file
86
interfaces/menus/boot/boot.tscn
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://bjctlqvs33nqy"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c1tjamjm8qjog" path="res://interfaces/menus/boot/background.webp" id="1_ph586"]
|
||||
[ext_resource type="PackedScene" uid="uid://1seg8cvss7a7" path="res://interfaces/menus/boot/multiplayer.tscn" id="2_lcb0h"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_snh7i"]
|
||||
bg_color = Color(0, 0.5, 0.5, 0.25)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_yqbr7"]
|
||||
script/source = "extends PanelContainer
|
||||
|
||||
const PLAYER = preload(\"res://characters/player/player.tscn\")
|
||||
const MAP = preload(\"res://maps/genesis/genesis.tscn\")
|
||||
|
||||
func _on_demo_pressed():
|
||||
# instantiate scenes
|
||||
var player = PLAYER.instantiate()
|
||||
var map = MAP.instantiate()
|
||||
# set player initial position
|
||||
player.position = Vector3(0,150,0)
|
||||
# add as siblings in tree
|
||||
for o in [map, player]:
|
||||
owner.add_sibling(o)
|
||||
# queue main_menu node for deletion
|
||||
owner.queue_free()
|
||||
|
||||
func _on_multiplayer_pressed():
|
||||
hide()
|
||||
owner.get_node(\"Multiplayer\").show()
|
||||
|
||||
func _on_quit_pressed():
|
||||
get_tree().quit()
|
||||
"
|
||||
|
||||
[node name="MainMenu" type="CanvasLayer"]
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("1_ph586")
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="Multiplayer" parent="." instance=ExtResource("2_lcb0h")]
|
||||
visible = false
|
||||
|
||||
[node name="Main" type="PanelContainer" parent="."]
|
||||
anchors_preset = 9
|
||||
anchor_bottom = 1.0
|
||||
offset_right = 313.0
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 0
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_snh7i")
|
||||
script = SubResource("GDScript_yqbr7")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Main"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Main/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
alignment = 1
|
||||
|
||||
[node name="Demo" type="Button" parent="Main/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Demo"
|
||||
|
||||
[node name="Multiplayer" type="Button" parent="Main/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Multiplayer"
|
||||
|
||||
[node name="Quit" type="Button" parent="Main/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Quit"
|
||||
|
||||
[connection signal="pressed" from="Main/MarginContainer/VBoxContainer/Demo" to="Main" method="_on_demo_pressed"]
|
||||
[connection signal="pressed" from="Main/MarginContainer/VBoxContainer/Multiplayer" to="Main" method="_on_multiplayer_pressed"]
|
||||
[connection signal="pressed" from="Main/MarginContainer/VBoxContainer/Quit" to="Main" method="_on_quit_pressed"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue