This commit is contained in:
2025-05-09 23:06:36 +02:00
parent f3d332f39c
commit dda8eac39a
135 changed files with 8297 additions and 186 deletions

BIN
ui/8_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

34
ui/8_white.png.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bfeh5lvkbcoa3"
path="res://.godot/imported/8_white.png-3310cdfde4b850a3d12e894d37835bed.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/8_white.png"
dest_files=["res://.godot/imported/8_white.png-3310cdfde4b850a3d12e894d37835bed.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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/Background.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

34
ui/Background.jpg.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://br70pis7ogpf5"
path="res://.godot/imported/Background.jpg-ed8729c4bc9d8f583e544e96bd473ca7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/Background.jpg"
dest_files=["res://.godot/imported/Background.jpg-ed8729c4bc9d8f583e544e96bd473ca7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

93
ui/loaD11A.tmp Normal file
View File

@@ -0,0 +1,93 @@
[gd_scene load_steps=6 format=3 uid="uid://cvv70003plsaj"]
[ext_resource type="Script" path="res://ui/src/loading_screen.gd" id="1_doqp6"]
[sub_resource type="Animation" id="Animation_ygl05"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_u3jsw"]
resource_name = "fade_in"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_f4ssj"]
resource_name = "fade_out"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ukok2"]
_data = {
"RESET": SubResource("Animation_ygl05"),
"fade_in": SubResource("Animation_u3jsw"),
"fade_out": SubResource("Animation_f4ssj")
}
[node name="LoadingScreen" type="ColorRect"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 1)
script = ExtResource("1_doqp6")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -31.0
offset_top = -27.0
offset_right = 31.0
offset_bottom = 27.0
grow_horizontal = 2
grow_vertical = 2
[node name="ProgressBar" type="ProgressBar" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer"]
layout_mode = 2
text = "Loading
"
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
"": SubResource("AnimationLibrary_ukok2")
}

99
ui/loading_screen.tscn Normal file
View File

@@ -0,0 +1,99 @@
[gd_scene load_steps=6 format=3 uid="uid://cvv70003plsaj"]
[ext_resource type="Script" path="res://ui/src/loading_screen.gd" id="1_doqp6"]
[sub_resource type="Animation" id="Animation_ygl05"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_u3jsw"]
resource_name = "fade_in"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_f4ssj"]
resource_name = "fade_out"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ukok2"]
_data = {
"RESET": SubResource("Animation_ygl05"),
"fade_in": SubResource("Animation_u3jsw"),
"fade_out": SubResource("Animation_f4ssj")
}
[node name="LoadingScreen" type="ColorRect"]
process_mode = 3
z_index = 10
z_as_relative = false
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 1)
script = ExtResource("1_doqp6")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -227.0
offset_top = -27.0
offset_right = 227.0
offset_bottom = 27.0
grow_horizontal = 2
grow_vertical = 2
alignment = 1
[node name="Label" type="Label" parent="VBoxContainer"]
layout_mode = 2
text = "Loading
"
horizontal_alignment = 1
vertical_alignment = 1
[node name="ProgressBar" type="ProgressBar" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
"": SubResource("AnimationLibrary_ukok2")
}

86
ui/main_menu.tscn Normal file
View File

@@ -0,0 +1,86 @@
[gd_scene load_steps=4 format=3 uid="uid://c8od2cc6ck4k5"]
[ext_resource type="Script" uid="uid://cvpje2w2881j7" path="res://ui/src/main_menu.gd" id="1_k6bbd"]
[ext_resource type="Texture2D" uid="uid://br70pis7ogpf5" path="res://ui/Background.jpg" id="1_lntkk"]
[ext_resource type="Script" uid="uid://dq43w4hln4sud" path="res://ui/src/grab_focus_on_enter.gd" id="3_e2uto"]
[node name="MainMenu" type="TextureRect"]
process_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_lntkk")
expand_mode = 5
stretch_mode = 6
script = ExtResource("1_k6bbd")
[node name="MainPanel" type="PanelContainer" parent="."]
auto_translate_mode = 1
layout_mode = 1
anchors_preset = 13
anchor_left = 0.5
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -180.0
offset_right = 180.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="MainPanel"]
auto_translate_mode = 1
layout_mode = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 30
theme_override_constants/margin_bottom = 10
[node name="VBoxContainer" type="VBoxContainer" parent="MainPanel/MarginContainer"]
auto_translate_mode = 1
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="MainPanel/MarginContainer/VBoxContainer"]
auto_translate_mode = 1
layout_mode = 2
theme_override_font_sizes/font_size = 48
text = "Main menu"
horizontal_alignment = 1
vertical_alignment = 1
[node name="ContinueButton" type="Button" parent="MainPanel/MarginContainer/VBoxContainer"]
auto_translate_mode = 1
layout_mode = 2
focus_mode = 0
disabled = true
text = "Continue"
[node name="NewGameButton" type="Button" parent="MainPanel/MarginContainer/VBoxContainer"]
auto_translate_mode = 1
layout_mode = 2
text = "New Game"
script = ExtResource("3_e2uto")
[node name="LoadButton" type="Button" parent="MainPanel/MarginContainer/VBoxContainer"]
auto_translate_mode = 1
layout_mode = 2
focus_mode = 0
disabled = true
text = "Load"
[node name="SettingsButton" type="Button" parent="MainPanel/MarginContainer/VBoxContainer"]
auto_translate_mode = 1
layout_mode = 2
focus_mode = 0
disabled = true
text = "Settings"
[node name="QuitButton" type="Button" parent="MainPanel/MarginContainer/VBoxContainer"]
auto_translate_mode = 1
layout_mode = 2
text = "Quit"
[connection signal="pressed" from="MainPanel/MarginContainer/VBoxContainer/NewGameButton" to="." method="_on_new_game_button_pressed"]
[connection signal="pressed" from="MainPanel/MarginContainer/VBoxContainer/QuitButton" to="." method="_on_quit_button_pressed"]

View File

@@ -1,7 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://dilbjuywlv0mc"]
[gd_scene load_steps=5 format=3 uid="uid://dilbjuywlv0mc"]
[ext_resource type="Shader" path="res://src/shaders/ui/blur.gdshader" id="1_q1q1u"]
[ext_resource type="Script" path="res://ui/src/pause_menu.gd" id="1_qw2fh"]
[ext_resource type="Script" path="res://ui/src/grab_focus_on_enter.gd" id="3_eviv0"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_dcwl4"]
shader = ExtResource("1_q1q1u")
@@ -10,7 +11,6 @@ shader_parameter/tint = Color(0.5, 0.5, 0.5, 1)
[node name="PauseMenu" type="Control"]
process_mode = 2
visible = false
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@@ -51,11 +51,11 @@ vertical_alignment = 1
[node name="ContinueButton" type="Button" parent="MainPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Continue"
script = ExtResource("3_eviv0")
[node name="QuitButton" type="Button" parent="MainPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Quit
"
text = "Quit"
[connection signal="pressed" from="MainPanel/MarginContainer/VBoxContainer/ContinueButton" to="." method="_on_continue"]
[connection signal="pressed" from="MainPanel/MarginContainer/VBoxContainer/QuitButton" to="." method="_on_quit"]

View File

@@ -0,0 +1,4 @@
extends Control
func _enter_tree() -> void:
grab_focus()

View File

@@ -0,0 +1 @@
uid://dq43w4hln4sud

14
ui/src/loading_screen.gd Normal file
View File

@@ -0,0 +1,14 @@
class_name LoadingScreen extends Node
@onready var _progress_bar: ProgressBar = %ProgressBar
@onready var _player: AnimationPlayer = %AnimationPlayer
func _ready() -> void:
return
func fade_out() -> void:
return
func _process(_delta: float) -> void:
if SceneLoader.progress.size() > 0:
_progress_bar.value = SceneLoader.progress[0] * 100

View File

@@ -0,0 +1 @@
uid://dc7ug0ojnhtgo

13
ui/src/main_menu.gd Normal file
View File

@@ -0,0 +1,13 @@
extends Control
func _input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
func _on_new_game_button_pressed() -> void:
GameManager.start_new_game()
func _on_quit_button_pressed() -> void:
GameManager.quit_game()

1
ui/src/main_menu.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://cvpje2w2881j7

View File

@@ -1,7 +1,12 @@
class_name PauseMenu extends Node
func _input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
func _on_continue() -> void:
GameManager.pause_game(false)
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
func _on_quit() -> void:
GameManager.quit_game()
GameManager.load_menu()

1
ui/src/pause_menu.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://ir3th8i5efqy

View File

@@ -0,0 +1,10 @@
[gd_resource type="StyleBoxTexture" load_steps=2 format=3 uid="uid://bs86xa3ndhnex"]
[ext_resource type="Texture2D" uid="uid://fqalhssuqttw" path="res://ui/theme/textures/panel-border-010.png" id="1_k25a8"]
[resource]
texture = ExtResource("1_k25a8")
texture_margin_left = 12.0
texture_margin_top = 8.0
texture_margin_right = 12.0
texture_margin_bottom = 8.0

View File

@@ -0,0 +1,11 @@
[gd_resource type="StyleBoxTexture" load_steps=2 format=3 uid="uid://fpd6nejws8j2"]
[ext_resource type="Texture2D" uid="uid://fqalhssuqttw" path="res://ui/theme/textures/panel-border-010.png" id="1_sjd36"]
[resource]
texture = ExtResource("1_sjd36")
texture_margin_left = 12.0
texture_margin_top = 8.0
texture_margin_right = 12.0
texture_margin_bottom = 8.0
modulate_color = Color(0.219501, 0.219501, 0.219501, 1)

View File

@@ -0,0 +1,10 @@
[gd_resource type="StyleBoxTexture" load_steps=2 format=3 uid="uid://bsvyo8xuheaik"]
[ext_resource type="Texture2D" uid="uid://s0m8eshssof0" path="res://ui/theme/textures/panel-transparent-center-010.png" id="1_tkcyb"]
[resource]
texture = ExtResource("1_tkcyb")
texture_margin_left = 12.0
texture_margin_top = 8.0
texture_margin_right = 12.0
texture_margin_bottom = 8.0

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 131 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bfw31o60nky1t"
path="res://.godot/imported/fantasy-ui-borders.svg-6ef3a99b528e50d649fab705566f863e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/theme/fantasy-ui-borders.svg"
dest_files=["res://.godot/imported/fantasy-ui-borders.svg-6ef3a99b528e50d649fab705566f863e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b7genvtlrhd6w"
path="res://.godot/imported/panel-010.png-3fd45932e2fd659565a230b9b2cdf6dd.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/theme/textures/panel-010.png"
dest_files=["res://.godot/imported/panel-010.png-3fd45932e2fd659565a230b9b2cdf6dd.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://fqalhssuqttw"
path="res://.godot/imported/panel-border-010.png-0d4ba903925fd38f8b3c74675220edab.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/theme/textures/panel-border-010.png"
dest_files=["res://.godot/imported/panel-border-010.png-0d4ba903925fd38f8b3c74675220edab.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://s0m8eshssof0"
path="res://.godot/imported/panel-transparent-center-010.png-cf7fd4bffee88fcde913697e65711b54.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/theme/textures/panel-transparent-center-010.png"
dest_files=["res://.godot/imported/panel-transparent-center-010.png-cf7fd4bffee88fcde913697e65711b54.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

14
ui/theme/ui_theme.tres Normal file
View File

@@ -0,0 +1,14 @@
[gd_resource type="Theme" load_steps=5 format=3 uid="uid://byofm2ne4r566"]
[ext_resource type="StyleBox" uid="uid://fpd6nejws8j2" path="res://ui/theme/borderStylebox_disabled.tres" id="1_1fb4l"]
[ext_resource type="StyleBox" uid="uid://bs86xa3ndhnex" path="res://ui/theme/borderStylebox.tres" id="1_wejdb"]
[ext_resource type="StyleBox" uid="uid://bsvyo8xuheaik" path="res://ui/theme/borderStylebox_selected.tres" id="2_47dt1"]
[ext_resource type="FontFile" uid="uid://clefrrtb0iqcs" path="res://fonts/AvQest.ttf" id="2_giagi"]
[resource]
default_font = ExtResource("2_giagi")
default_font_size = 20
Button/styles/disabled = ExtResource("1_1fb4l")
Button/styles/focus = ExtResource("2_47dt1")
Button/styles/hover = ExtResource("2_47dt1")
Button/styles/normal = ExtResource("1_wejdb")