settings, small fixes

This commit is contained in:
Daniel Kauss Serna 2026-02-15 16:17:51 +01:00
parent b12c193636
commit e08e3ebb13
174 changed files with 997 additions and 1040 deletions

BIN
ui/healt_bar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

40
ui/healt_bar.png.import Normal file
View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bng412si6gw5w"
path="res://.godot/imported/healt_bar.png-7b40148fbbc239faa42aeaf5609db745.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/healt_bar.png"
dest_files=["res://.godot/imported/healt_bar.png-7b40148fbbc239faa42aeaf5609db745.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
ui/pick_up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

40
ui/pick_up.png.import Normal file
View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://brti1euuui0tv"
path="res://.godot/imported/pick_up.png-3946f04bd47372ea019aa8942f260aee.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/pick_up.png"
dest_files=["res://.godot/imported/pick_up.png-3946f04bd47372ea019aa8942f260aee.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

129
ui/settings_menu.tscn Normal file
View file

@ -0,0 +1,129 @@
[gd_scene load_steps=6 format=3 uid="uid://c6f7s7bsitw13"]
[ext_resource type="Texture2D" uid="uid://v1jfj7f777uq" path="res://ui/container_bg.png" id="1_2ty5h"]
[ext_resource type="Script" uid="uid://c62xd44e27oki" path="res://scripts/settings_menu.gd" id="2_tog15"]
[ext_resource type="Theme" uid="uid://d3iyu7ukwsn1p" path="res://ui/default_theme.tres" id="3_ap6h8"]
[ext_resource type="Script" uid="uid://llka3aa044jo" path="res://scripts/click.gd" id="4_jpwvl"]
[sub_resource type="CanvasTexture" id="CanvasTexture_1evs6"]
diffuse_texture = ExtResource("1_2ty5h")
[node name="SettingsMenu" type="NinePatchRect" node_paths=PackedStringArray("volume_slider", "fullscreen_check", "vsync_check", "glow_check")]
visible = false
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -100.0
offset_top = -100.0
offset_right = 100.0
offset_bottom = 100.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("CanvasTexture_1evs6")
patch_margin_left = 8
patch_margin_top = 8
patch_margin_right = 8
patch_margin_bottom = 8
script = ExtResource("2_tog15")
volume_slider = NodePath("MarginContainer/VBoxContainer/HBoxContainer/Volume")
fullscreen_check = NodePath("MarginContainer/VBoxContainer/Fullscreen/CheckBox")
vsync_check = NodePath("MarginContainer/VBoxContainer/Vsync/CheckBox")
glow_check = NodePath("MarginContainer/VBoxContainer/Glow/CheckBox")
[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 = ExtResource("3_ap6h8")
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
theme = ExtResource("3_ap6h8")
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Volume"
[node name="Volume" type="HSlider" parent="MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("3_ap6h8")
max_value = 1.0
step = 0.01
tick_count = 5
ticks_on_borders = true
ticks_position = 3
[node name="Fullscreen" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/Fullscreen"]
layout_mode = 2
size_flags_horizontal = 0
text = "Fullscreen"
[node name="CheckBox" type="CheckBox" parent="MarginContainer/VBoxContainer/Fullscreen"]
layout_mode = 2
size_flags_horizontal = 10
[node name="Vsync" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/Vsync"]
layout_mode = 2
size_flags_horizontal = 0
text = "Vsync"
[node name="CheckBox" type="CheckBox" parent="MarginContainer/VBoxContainer/Vsync"]
layout_mode = 2
size_flags_horizontal = 10
[node name="Glow" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/Glow"]
layout_mode = 2
size_flags_horizontal = 0
text = "Glow"
[node name="CheckBox" type="CheckBox" parent="MarginContainer/VBoxContainer/Glow"]
layout_mode = 2
size_flags_horizontal = 10
[node name="Buttons" type="MarginContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 10
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer/Buttons"]
layout_mode = 2
size_flags_vertical = 10
[node name="ExitButton" type="Button" parent="MarginContainer/VBoxContainer/Buttons/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 0
text = "Exit"
script = ExtResource("4_jpwvl")
[node name="ContinueButton" type="Button" parent="MarginContainer/VBoxContainer/Buttons/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 10
text = "Continue"
script = ExtResource("4_jpwvl")
[connection signal="value_changed" from="MarginContainer/VBoxContainer/HBoxContainer/Volume" to="." method="_on_volume_changed"]
[connection signal="toggled" from="MarginContainer/VBoxContainer/Fullscreen/CheckBox" to="." method="_on_fullscreen_toggled"]
[connection signal="toggled" from="MarginContainer/VBoxContainer/Vsync/CheckBox" to="." method="_on_vsync_toggled"]
[connection signal="toggled" from="MarginContainer/VBoxContainer/Glow/CheckBox" to="." method="_on_glow_toggled"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/Buttons/HBoxContainer2/ExitButton" to="." method="_on_exit_button_pressed"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/Buttons/HBoxContainer2/ContinueButton" to="." method="_on_continue_button_pressed"]

BIN
ui/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

40
ui/title.png.import Normal file
View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ddvyrpgjh4o3c"
path="res://.godot/imported/title.png-5eea9f4654390823b21fcaef01d8e1c7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/title.png"
dest_files=["res://.godot/imported/title.png-5eea9f4654390823b21fcaef01d8e1c7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,20 +1,27 @@
[gd_scene load_steps=13 format=3 uid="uid://bq8ig7s8gxia4"]
[gd_scene load_steps=15 format=3 uid="uid://bq8ig7s8gxia4"]
[ext_resource type="Theme" uid="uid://d3iyu7ukwsn1p" path="res://ui/default_theme.tres" id="1_1evs6"]
[ext_resource type="PackedScene" uid="uid://bvp37ljy8eaba" path="res://ui/texture_container.tscn" id="3_nsgok"]
[ext_resource type="Script" uid="uid://c62xd44e27oki" path="res://scripts/settings_menu.gd" id="4_f4m0o"]
[ext_resource type="Script" uid="uid://da2hsusvv3rxg" path="res://scripts/debug_ui.gd" id="5_h6use"]
[ext_resource type="Script" uid="uid://bimyryljv4hs2" path="res://ui/dialogue.gd" id="6_kes38"]
[ext_resource type="Texture2D" uid="uid://bng412si6gw5w" path="res://assets/healt_bar.png" id="7_np4cb"]
[ext_resource type="Texture2D" uid="uid://bng412si6gw5w" path="res://ui/healt_bar.png" id="7_np4cb"]
[ext_resource type="Script" uid="uid://cj6pb1828dcfr" path="res://scripts/health_bar.gd" id="8_8fqmc"]
[ext_resource type="PackedScene" uid="uid://c6f7s7bsitw13" path="res://ui/settings_menu.tscn" id="8_14s75"]
[ext_resource type="Texture2D" uid="uid://efh5dlhsxsnq" path="res://ui/bar_under.png" id="9_fl7ai"]
[ext_resource type="Texture2D" uid="uid://bdi1ga46vj8lt" path="res://ui/bar_progress.png" id="10_iwd8l"]
[ext_resource type="Script" uid="uid://cqrqqn2p0h0kb" path="res://scripts/mask_bar.gd" id="11_01h74"]
[ext_resource type="Script" uid="uid://llka3aa044jo" path="res://click.gd" id="12_14s75"]
[ext_resource type="Script" uid="uid://dgxs6odxyi6s4" path="res://scripts/dmg_flash.gd" id="12_vi4d2"]
[ext_resource type="Shader" uid="uid://djbssih1prixl" path="res://shaders/post_processing.gdshader" id="13_1evs6"]
[sub_resource type="AtlasTexture" id="AtlasTexture_dhpj7"]
atlas = ExtResource("7_np4cb")
region = Rect2(0, 0, 0, 32)
region = Rect2(0, 32, 0, 32)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_umou3"]
shader = ExtResource("13_1evs6")
shader_parameter/brightness = 0.950000045125
shader_parameter/contrast = 1.0
shader_parameter/saturation = 2.0
[node name="UILayer" type="CanvasLayer"]
scale = Vector2(4, 4)
@ -24,32 +31,24 @@ transform = Transform2D(4, 0, 0, 4, 0, 0)
process_mode = 3
layout_mode = 3
anchors_preset = 0
offset_right = 480.0
offset_bottom = 270.0
offset_right = 640.0
offset_bottom = 360.0
size_flags_horizontal = 0
mouse_filter = 2
theme = ExtResource("1_1evs6")
[node name="Debug" type="Control" parent="UI"]
visible = false
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -40.0
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
grow_horizontal = 0
mouse_filter = 2
script = ExtResource("5_h6use")
[node name="Label" type="Label" parent="UI/Debug"]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -40.0
offset_bottom = 23.0
grow_horizontal = 0
offset_right = 28.0
offset_bottom = 179.0
text = "Dbue
g
g
@ -63,7 +62,41 @@ g
g
g
"
horizontal_alignment = 2
[node name="PlayerStat" type="HBoxContainer" parent="UI"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -83.5
offset_top = -63.0
offset_right = 83.5
offset_bottom = -23.0
grow_horizontal = 2
grow_vertical = 0
mouse_filter = 2
[node name="TextureProgressBar" type="TextureProgressBar" parent="UI/PlayerStat"]
layout_mode = 2
size_flags_vertical = 4
max_value = 1.0
step = 0.01
value = 1.0
texture_under = ExtResource("9_fl7ai")
texture_progress = ExtResource("10_iwd8l")
script = ExtResource("11_01h74")
[node name="HealthBar" type="TextureRect" parent="UI/PlayerStat"]
layout_mode = 2
size_flags_vertical = 4
texture = SubResource("AtlasTexture_dhpj7")
script = ExtResource("8_8fqmc")
[node name="SettingsMenu" parent="UI" instance=ExtResource("8_14s75")]
layout_mode = 0
anchors_preset = 0
[node name="DialogueBox" parent="UI" node_paths=PackedStringArray("dialogue_label") instance=ExtResource("3_nsgok")]
visible = false
@ -74,9 +107,9 @@ anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -172.61873
offset_top = -71.0
offset_right = 172.61873
offset_bottom = 0.0
offset_top = -103.5
offset_right = 172.61871
offset_bottom = -32.5
grow_horizontal = 2
grow_vertical = 0
script = ExtResource("6_kes38")
@ -95,137 +128,35 @@ layout_mode = 2
theme = ExtResource("1_1evs6")
text = "This is example dialogue!!"
[node name="HBoxContainer" type="HBoxContainer" parent="UI"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -83.5
offset_top = -63.0
offset_right = 83.5
offset_bottom = -23.0
grow_horizontal = 2
grow_vertical = 0
mouse_filter = 2
[node name="TextureProgressBar" type="TextureProgressBar" parent="UI/HBoxContainer"]
layout_mode = 2
size_flags_vertical = 4
max_value = 1.0
step = 0.01
value = 1.0
texture_under = ExtResource("9_fl7ai")
texture_progress = ExtResource("10_iwd8l")
script = ExtResource("11_01h74")
[node name="HealthBar" type="TextureRect" parent="UI/HBoxContainer"]
layout_mode = 2
size_flags_vertical = 4
texture = SubResource("AtlasTexture_dhpj7")
script = ExtResource("8_8fqmc")
[node name="SettingsMenu" parent="UI" node_paths=PackedStringArray("volume_slider", "fullscreen_check", "vsync_check") instance=ExtResource("3_nsgok")]
visible = false
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -100.5625
offset_top = -100.5625
offset_right = 100.5625
offset_bottom = 100.5625
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_1evs6")
axis_stretch_horizontal = 1
axis_stretch_vertical = 1
script = ExtResource("4_f4m0o")
volume_slider = NodePath("MarginContainer/VBoxContainer/HBoxContainer/Volume")
fullscreen_check = NodePath("MarginContainer/VBoxContainer/Fullscreen/CheckBox")
vsync_check = NodePath("MarginContainer/VBoxContainer/Vsync/CheckBox")
[node name="MarginContainer" type="MarginContainer" parent="UI/SettingsMenu"]
[node name="PostProcessing" type="Control" parent="UI"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_1evs6")
mouse_filter = 2
[node name="VBoxContainer" type="VBoxContainer" parent="UI/SettingsMenu/MarginContainer"]
layout_mode = 2
theme = ExtResource("1_1evs6")
[node name="DmgFlash" type="ColorRect" parent="UI/PostProcessing"]
visible = false
z_index = 10
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
color = Color(0.8862745, 0.49019608, 0.47058824, 0)
script = ExtResource("12_vi4d2")
[node name="HBoxContainer" type="HBoxContainer" parent="UI/SettingsMenu/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="UI/SettingsMenu/MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Volume"
[node name="Volume" type="HSlider" parent="UI/SettingsMenu/MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("1_1evs6")
max_value = 1.0
step = 0.01
tick_count = 5
ticks_on_borders = true
ticks_position = 3
[node name="Fullscreen" type="HBoxContainer" parent="UI/SettingsMenu/MarginContainer/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="UI/SettingsMenu/MarginContainer/VBoxContainer/Fullscreen"]
layout_mode = 2
size_flags_horizontal = 0
text = "Fullscreen"
[node name="CheckBox" type="CheckBox" parent="UI/SettingsMenu/MarginContainer/VBoxContainer/Fullscreen"]
layout_mode = 2
size_flags_horizontal = 10
[node name="Vsync" type="HBoxContainer" parent="UI/SettingsMenu/MarginContainer/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="UI/SettingsMenu/MarginContainer/VBoxContainer/Vsync"]
layout_mode = 2
size_flags_horizontal = 0
text = "Vsync"
[node name="CheckBox" type="CheckBox" parent="UI/SettingsMenu/MarginContainer/VBoxContainer/Vsync"]
layout_mode = 2
size_flags_horizontal = 10
[node name="Buttons" type="MarginContainer" parent="UI/SettingsMenu/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 10
[node name="HBoxContainer2" type="HBoxContainer" parent="UI/SettingsMenu/MarginContainer/VBoxContainer/Buttons"]
layout_mode = 2
size_flags_vertical = 10
[node name="ExitButton" type="Button" parent="UI/SettingsMenu/MarginContainer/VBoxContainer/Buttons/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 0
text = "Exit"
script = ExtResource("12_14s75")
[node name="ContinueButton" type="Button" parent="UI/SettingsMenu/MarginContainer/VBoxContainer/Buttons/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 10
text = "Continue"
script = ExtResource("12_14s75")
[connection signal="value_changed" from="UI/SettingsMenu/MarginContainer/VBoxContainer/HBoxContainer/Volume" to="UI/SettingsMenu" method="_on_volume_changed"]
[connection signal="toggled" from="UI/SettingsMenu/MarginContainer/VBoxContainer/Fullscreen/CheckBox" to="UI/SettingsMenu" method="_on_fullscreen_toggled"]
[connection signal="toggled" from="UI/SettingsMenu/MarginContainer/VBoxContainer/Vsync/CheckBox" to="UI/SettingsMenu" method="_on_vsync_toggled"]
[connection signal="pressed" from="UI/SettingsMenu/MarginContainer/VBoxContainer/Buttons/HBoxContainer2/ExitButton" to="UI/SettingsMenu" method="_on_exit_button_pressed"]
[connection signal="pressed" from="UI/SettingsMenu/MarginContainer/VBoxContainer/Buttons/HBoxContainer2/ContinueButton" to="UI/SettingsMenu" method="_on_continue_button_pressed"]
[node name="ColorCorrection" type="ColorRect" parent="UI/PostProcessing"]
z_index = 10
material = SubResource("ShaderMaterial_umou3")
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2