Refactor console and scene structure; update resource paths and add configuration handling

This commit is contained in:
2025-05-03 19:49:23 +02:00
parent aa2bd7b3b0
commit f75d05dde1
59 changed files with 714 additions and 136 deletions

79
objects/ui/hud.tscn Normal file
View File

@@ -0,0 +1,79 @@
[gd_scene load_steps=8 format=3 uid="uid://byxf45ukq82pe"]
[ext_resource type="LabelSettings" uid="uid://rvn5ivivfvv6" path="res://resources/ui/hud_label_settings.tres" id="1_4dsh5"]
[ext_resource type="Script" uid="uid://c3pde84b3kdco" path="res://scripts/hud.gd" id="1_ueofj"]
[ext_resource type="FontFile" uid="uid://xm0vbusjr7b7" path="res://fonts/PressStart2P-Regular.ttf" id="1_ygmwt"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mmcdi"]
bg_color = Color(0, 0, 0, 1)
[sub_resource type="Theme" id="Theme_auu2b"]
default_font = ExtResource("1_ygmwt")
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sp6hg"]
bg_color = Color(0.47451, 0.47451, 0.47451, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_22dp1"]
bg_color = Color(0.858824, 0.254902, 0.380392, 1)
[node name="HUD" type="Control" node_paths=PackedStringArray("coins_label", "health_progressbar", "lives_label")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
script = ExtResource("1_ueofj")
coins_label = NodePath("PanelContainer/MarginContainer/HBoxContainer/Coins label")
health_progressbar = NodePath("PanelContainer/MarginContainer/HBoxContainer/ProgressBar")
lives_label = NodePath("PanelContainer/MarginContainer/HBoxContainer/Lives")
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_bottom = 16.0
grow_horizontal = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_mmcdi")
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 8
[node name="Health Label" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
text = "Health"
label_settings = ExtResource("1_4dsh5")
uppercase = true
[node name="ProgressBar" type="ProgressBar" parent="PanelContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
theme = SubResource("Theme_auu2b")
theme_override_styles/background = SubResource("StyleBoxFlat_sp6hg")
theme_override_styles/fill = SubResource("StyleBoxFlat_22dp1")
step = 0.1
value = 60.0
show_percentage = false
[node name="Lives" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
text = "Lives 3"
label_settings = ExtResource("1_4dsh5")
uppercase = true
[node name="Coins label" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
text = "Coins 33"
label_settings = ExtResource("1_4dsh5")
uppercase = true

View File

@@ -0,0 +1,50 @@
[gd_scene load_steps=3 format=3 uid="uid://bxpr4m7lq7clh"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_h8s4o"]
bg_color = Color(1, 1, 1, 0.392157)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_v2gus"]
bg_color = Color(0, 0, 0, 0.501961)
[node name="Input button" type="Button"]
custom_minimum_size = Vector2(0, 16)
anchors_preset = 10
anchor_right = 1.0
grow_horizontal = 2
theme_override_styles/hover = SubResource("StyleBoxFlat_h8s4o")
theme_override_styles/pressed = SubResource("StyleBoxFlat_h8s4o")
theme_override_styles/normal = SubResource("StyleBoxFlat_v2gus")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 4
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 4
theme_override_constants/margin_bottom = 4
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
layout_mode = 2
[node name="LabelAction" type="Label" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
mouse_filter = 1
text = "left"
vertical_alignment = 1
uppercase = true
[node name="Spacer" type="Control" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 1
[node name="LabelInput" type="Label" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
mouse_filter = 1
text = "A"
vertical_alignment = 1
uppercase = true

View File

@@ -0,0 +1,76 @@
[gd_scene load_steps=4 format=3 uid="uid://cvfsbiy5ggrpg"]
[ext_resource type="PackedScene" uid="uid://bxpr4m7lq7clh" path="res://objects/ui/input_button.tscn" id="1_h8s4o"]
[ext_resource type="Script" uid="uid://dppwl7xie2mh" path="res://scripts/input_settings.gd" id="1_v2gus"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_se25o"]
bg_color = Color(0, 0, 0, 1)
[node name="Input Settings" type="Control" node_paths=PackedStringArray("action_list", "reset_to_default_button")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_v2gus")
action_list = NodePath("PanelContainer/MarginContainer/VBoxContainer/ScrollContainer/Actions")
reset_to_default_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Reset to default Button")
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_se25o")
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 16
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 16
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "input"
horizontal_alignment = 1
vertical_alignment = 1
uppercase = true
[node name="ScrollContainer" type="ScrollContainer" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="Actions" type="VBoxContainer" parent="PanelContainer/MarginContainer/VBoxContainer/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 8
[node name="Input button" parent="PanelContainer/MarginContainer/VBoxContainer/ScrollContainer/Actions" instance=ExtResource("1_h8s4o")]
layout_mode = 2
[node name="Input button2" parent="PanelContainer/MarginContainer/VBoxContainer/ScrollContainer/Actions" instance=ExtResource("1_h8s4o")]
layout_mode = 2
[node name="Input button3" parent="PanelContainer/MarginContainer/VBoxContainer/ScrollContainer/Actions" instance=ExtResource("1_h8s4o")]
layout_mode = 2
[node name="Input button4" parent="PanelContainer/MarginContainer/VBoxContainer/ScrollContainer/Actions" instance=ExtResource("1_h8s4o")]
layout_mode = 2
[node name="Input button5" parent="PanelContainer/MarginContainer/VBoxContainer/ScrollContainer/Actions" instance=ExtResource("1_h8s4o")]
layout_mode = 2
[node name="Input button6" parent="PanelContainer/MarginContainer/VBoxContainer/ScrollContainer/Actions" instance=ExtResource("1_h8s4o")]
layout_mode = 2
[node name="Reset to default Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "RESET TO DEFAULT"
flat = true

View File

@@ -0,0 +1,64 @@
[gd_scene load_steps=11 format=3 uid="uid://dlm2ri562fynd"]
[ext_resource type="Script" uid="uid://duifmqjarjpuv" path="res://scripts/marketplace.gd" id="1_ncpyg"]
[ext_resource type="FontFile" uid="uid://xm0vbusjr7b7" path="res://fonts/PressStart2P-Regular.ttf" id="2_ho1tm"]
[ext_resource type="Script" uid="uid://bya240e627ti6" path="res://scripts/resources/skill_data.gd" id="2_pg4mc"]
[ext_resource type="Resource" uid="uid://dw5ee2lpeypnb" path="res://resources/skills/brick_throw.tres" id="3_bk5yi"]
[ext_resource type="Resource" uid="uid://cdp8sex36vdq2" path="res://resources/skills/explosive_brick.tres" id="4_tx0n3"]
[ext_resource type="Resource" uid="uid://2glvryih82t1" path="res://resources/skills/fire_brick.tres" id="5_fqx8e"]
[ext_resource type="Resource" uid="uid://cx5fsbexblp60" path="res://resources/skills/ice_brick.tres" id="6_6665y"]
[ext_resource type="Resource" uid="uid://d3bjre2etov1n" path="res://resources/skills/magnetic.tres" id="7_ukny6"]
[ext_resource type="PackedScene" uid="uid://dtl03rod7l2t0" path="res://objects/ui/marketplace_button.tscn" id="9_ode10"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ode10"]
bg_color = Color(0, 0, 0, 1)
[node name="Marketplace" type="Control" node_paths=PackedStringArray("root", "grid")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_ncpyg")
root = NodePath(".")
skill_data = Array[ExtResource("2_pg4mc")]([ExtResource("3_bk5yi"), ExtResource("4_tx0n3"), ExtResource("5_fqx8e"), ExtResource("6_6665y"), ExtResource("7_ukny6")])
grid = NodePath("PanelContainer/MarginContainer/VBoxContainer/GridContainer")
font = ExtResource("2_ho1tm")
marketplace_button = ExtResource("9_ode10")
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_ode10")
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 32
[node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "marketplace"
horizontal_alignment = 1
vertical_alignment = 1
justification_flags = 162
uppercase = true
[node name="GridContainer" type="GridContainer" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 2
theme_override_constants/h_separation = 4
theme_override_constants/v_separation = 16
columns = 3

View File

@@ -0,0 +1,11 @@
[gd_scene load_steps=2 format=3 uid="uid://dtl03rod7l2t0"]
[ext_resource type="Texture2D" uid="uid://cvhoq7aubxlmq" path="res://sprites/ui/magnetic_skill_icon.png" id="1_5kqfg"]
[node name="MarketplaceButton" type="Button"]
offset_right = 8.0
offset_bottom = 8.0
theme_override_font_sizes/font_size = 8
text = "Fire brick 100"
icon = ExtResource("1_5kqfg")
flat = true

View File

@@ -0,0 +1,75 @@
[gd_scene load_steps=3 format=3 uid="uid://i6mnjbjcoqe5"]
[ext_resource type="Script" uid="uid://cugifchx6jhuk" path="res://scripts/pause_menu.gd" id="1_aktha"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g4ivv"]
bg_color = Color(0, 0, 0, 1)
[node name="Pause menu" type="Control" node_paths=PackedStringArray("pause_menu_control", "resume_button", "quit_button", "settings_button", "exit_to_menu_button")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 6
size_flags_vertical = 6
script = ExtResource("1_aktha")
pause_menu_control = NodePath(".")
resume_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Resume Button")
quit_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Quit game Button")
settings_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Settings Button")
exit_to_menu_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Exit to menu Button")
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_g4ivv")
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
[node name="Pause" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Pause"
horizontal_alignment = 1
vertical_alignment = 1
uppercase = true
[node name="Spacer" type="Control" parent="PanelContainer/MarginContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 32)
layout_mode = 2
size_flags_vertical = 3
[node name="Resume Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "RESUME"
flat = true
[node name="Settings Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "SETTINGS"
flat = true
[node name="Exit to menu Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "EXIT TO MENU"
flat = true
[node name="Quit game Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "QUIT GAME"
flat = true

View File

@@ -0,0 +1,72 @@
[gd_scene load_steps=3 format=3 uid="uid://y0ae6e7t70fj"]
[ext_resource type="Script" uid="uid://c506rigcjlm6x" path="res://scripts/settings_menu.gd" id="1_lt6q2"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wgbcl"]
bg_color = Color(0, 0, 0, 1)
[node name="Settings menu" type="Control" node_paths=PackedStringArray("settings_menu_control")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_lt6q2")
settings_menu_control = NodePath(".")
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_wgbcl")
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 16
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 16
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 16
[node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 16
text = "settings"
horizontal_alignment = 1
vertical_alignment = 1
uppercase = true
[node name="Spacer" type="Control" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="Input Settings Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "INPUT"
flat = true
[node name="Display Settings Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "DISPLAY"
flat = true
[node name="Audio Settings Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "AUDIO"
flat = true
[node name="Gameplay Settings Button" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "GAMEPLAY"
flat = true
[node name="Spacer2" type="Control" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3