Added main menu and basic functionality

This commit is contained in:
=
2026-04-26 16:55:35 +02:00
parent 21199f8026
commit d2c788c826
6 changed files with 119 additions and 1 deletions
+76
View File
@@ -0,0 +1,76 @@
[gd_scene format=3 uid="uid://cgsmfi2s51cbd"]
[ext_resource type="Script" uid="uid://br2udyi6t8yvf" path="res://Scripts/World.cs" id="1_xkndl"]
[ext_resource type="Script" uid="uid://dqrdb3bvws6b6" path="res://Scripts/SteamworksHandler.cs" id="2_xkndl"]
[ext_resource type="Script" uid="uid://c7khr6oist3ku" path="res://Scripts/Camera3d.cs" id="3_u44n3"]
[ext_resource type="Script" uid="uid://bm7knir4552j5" path="res://Scripts/Helpers/UIHandler.cs" id="4_sb48q"]
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_u44n3"]
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_u44n3"]
panorama = SubResource("CompressedTexture2D_u44n3")
[sub_resource type="Sky" id="Sky_u44n3"]
sky_material = SubResource("PanoramaSkyMaterial_u44n3")
[sub_resource type="Environment" id="Environment_sb48q"]
background_mode = 1
background_color = Color(0.27141052, 0.1874483, 0.13788113, 1)
sky = SubResource("Sky_u44n3")
glow_enabled = true
[node name="Main" type="Node3D" unique_id=234207355]
[node name="World" type="Node3D" parent="." unique_id=770208789]
script = ExtResource("1_xkndl")
[node name="SteamworksHandler" type="Node" parent="." unique_id=1183440473]
script = ExtResource("2_xkndl")
[node name="Camera3D" type="Camera3D" parent="." unique_id=161504606]
transform = Transform3D(1, 0, 0, 0, 0.25881907, 0.9659258, 0, -0.9659258, 0.25881907, 30, 20, 30)
current = true
script = ExtResource("3_u44n3")
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=377970686]
environment = SubResource("Environment_sb48q")
[node name="Control" type="Control" parent="." unique_id=1713248285]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -2.0
offset_bottom = 2.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("4_sb48q")
[node name="CodingWindow" type="Panel" parent="Control" unique_id=1765248892]
layout_mode = 1
anchors_preset = 11
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -500.0
grow_horizontal = 0
grow_vertical = 2
[node name="Button" type="Button" parent="Control/CodingWindow" unique_id=2015284121]
layout_mode = 0
offset_left = 100.0
offset_top = 600.0
offset_right = 400.0
offset_bottom = 635.0
text = "Move"
[node name="PositionInput" type="LineEdit" parent="Control/CodingWindow" unique_id=1834676849]
layout_mode = 0
offset_left = 125.0
offset_top = 50.0
offset_right = 375.0
offset_bottom = 85.0
placeholder_text = "Position... (X/Y OR X,Y)"
alignment = 1
+91
View File
@@ -0,0 +1,91 @@
[gd_scene format=3 uid="uid://dlommaelbbw2b"]
[ext_resource type="Script" uid="uid://dda0bhhqspbr0" path="res://Scripts/MainMenu.cs" id="1_tt5f1"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bnhvo"]
bg_color = Color(0.24115604, 0.24115607, 0.24115595, 1)
border_width_top = 1
border_width_bottom = 1
border_color = Color(0.025273602, 0.38374466, 0.4973219, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tt5f1"]
bg_color = Color(0.46618086, 0.4661808, 0.4661808, 1)
border_width_top = 1
border_width_bottom = 1
border_color = Color(0.025273602, 0.38374466, 0.4973219, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[node name="MainMenu" type="Control" unique_id=622011874]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_tt5f1")
[node name="Panel" type="Panel" parent="." unique_id=167014122]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="CenterContainer" type="CenterContainer" parent="." unique_id=546163427]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -4.0
offset_top = -126.5
offset_right = 4.0
offset_bottom = 126.5
grow_horizontal = 2
grow_vertical = 2
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer" unique_id=1309259619]
layout_mode = 2
theme_override_constants/separation = 40
[node name="RichTextLabel" type="RichTextLabel" parent="CenterContainer/VBoxContainer" unique_id=195514567]
layout_mode = 2
bbcode_enabled = true
text = "[font_size=50]RuinAdventurer[/font_size]"
fit_content = true
scroll_active = false
autowrap_mode = 0
horizontal_alignment = 1
[node name="Spacer" type="Panel" parent="CenterContainer/VBoxContainer" unique_id=1075556994]
layout_mode = 2
[node name="btnPlay" type="Button" parent="CenterContainer/VBoxContainer" unique_id=452402808]
layout_mode = 2
theme_override_styles/normal = SubResource("StyleBoxFlat_bnhvo")
theme_override_styles/hover = SubResource("StyleBoxFlat_tt5f1")
text = "Start Game"
[node name="btnOptions" type="Button" parent="CenterContainer/VBoxContainer" unique_id=891656915]
layout_mode = 2
theme_override_styles/normal = SubResource("StyleBoxFlat_bnhvo")
theme_override_styles/hover = SubResource("StyleBoxFlat_tt5f1")
text = "Options"
[node name="btnExit" type="Button" parent="CenterContainer/VBoxContainer" unique_id=2025231658]
layout_mode = 2
theme_override_styles/normal = SubResource("StyleBoxFlat_bnhvo")
theme_override_styles/hover = SubResource("StyleBoxFlat_tt5f1")
text = "Exit Game"
[connection signal="button_up" from="CenterContainer/VBoxContainer/btnPlay" to="." method="OnPlayPressed"]
[connection signal="button_up" from="CenterContainer/VBoxContainer/btnExit" to="." method="OnQuitPressed"]