diff --git a/project/project.godot b/project/project.godot index e51eb0a..231fb20 100644 --- a/project/project.godot +++ b/project/project.godot @@ -14,6 +14,8 @@ config/name="TheGates" config/description="Building new Internet" run/main_scene="res://the_gates/scenes/app.tscn" config/features=PackedStringArray("4.0") +boot_splash/image="res://the_gates/textures/background.png" +boot_splash/fullsize=false config/icon="res://the_gates/icons/icon_64.png" config/windows_native_icon="res://the_gates/icons/icon.ico" diff --git a/project/the_gates/scenes/components/bookmark.tscn b/project/the_gates/scenes/components/bookmark.tscn index 0787f38..68d94a4 100644 --- a/project/the_gates/scenes/components/bookmark.tscn +++ b/project/the_gates/scenes/components/bookmark.tscn @@ -1,8 +1,8 @@ -[gd_scene load_steps=7 format=3] +[gd_scene load_steps=7 format=3 uid="uid://82ca8so31njy"] [ext_resource type="Script" path="res://the_gates/scripts/ui/menu/bookmark_ui.gd" id="1_bpkqj"] [ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://the_gates/resources/gate_events.res" id="2_7i5yr"] -[ext_resource type="Texture2D" uid="uid://bj8xlyxihfske" path="res://the_gates/textures/background.jpg" id="3_fljny"] +[ext_resource type="Texture2D" uid="uid://cykx425p6ylwr" path="res://the_gates/textures/background.png" id="3_kgutt"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qq7cx"] corner_radius_top_left = 25 @@ -40,8 +40,8 @@ grow_horizontal = 2 grow_vertical = 2 size_flags_horizontal = 4 size_flags_vertical = 4 -texture = ExtResource("3_fljny") -ignore_texture_size = true +texture = ExtResource("3_kgutt") +expand_mode = 1 stretch_mode = 6 [node name="Gradient" type="TextureRect" parent="."] @@ -55,7 +55,7 @@ offset_top = -50.0 grow_horizontal = 2 grow_vertical = 0 texture = SubResource("GradientTexture2D_yd20y") -ignore_texture_size = true +expand_mode = 1 [node name="Title" type="Label" parent="."] layout_mode = 1 @@ -85,6 +85,9 @@ top_level = false clip_children = 0 light_mask = 1 visibility_layer = 1 +z_index = 0 +z_as_relative = true +y_sort_enabled = false texture_filter = 0 texture_repeat = 0 material = null @@ -111,6 +114,7 @@ size_flags_horizontal = 1 size_flags_vertical = 1 size_flags_stretch_ratio = 1.0 auto_translate = true +localize_numeral_system = true tooltip_text = "" focus_neighbor_left = NodePath("") focus_neighbor_top = NodePath("") @@ -126,14 +130,14 @@ theme = null theme_type_variation = &"" disabled = false toggle_mode = false -shortcut_in_tooltip = true button_pressed = false action_mode = 1 button_mask = 1 keep_pressed_outside = false +button_group = null shortcut = null shortcut_feedback = true -button_group = null +shortcut_in_tooltip = true script = null [connection signal="pressed" from="BaseButton" to="." method="_on_base_button_pressed"] diff --git a/project/the_gates/scenes/menu.tscn b/project/the_gates/scenes/menu.tscn index 4648717..69b2285 100644 --- a/project/the_gates/scenes/menu.tscn +++ b/project/the_gates/scenes/menu.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=19 format=3 uid="uid://5btb7nvgmfhl"] -[ext_resource type="Texture2D" uid="uid://bj8xlyxihfske" path="res://the_gates/textures/background.jpg" id="3_6p5p0"] +[ext_resource type="Texture2D" uid="uid://cykx425p6ylwr" path="res://the_gates/textures/background.png" id="1_uidjl"] [ext_resource type="Script" path="res://the_gates/scripts/ui/menu/exit_app.gd" id="4_2065t"] [ext_resource type="Script" path="res://the_gates/scripts/ui/menu/bottom_animation.gd" id="4_c1cpy"] [ext_resource type="PackedScene" uid="uid://ctam0fxigbefk" path="res://the_gates/scenes/components/search.tscn" id="5_li2do"] @@ -10,7 +10,7 @@ [ext_resource type="Script" path="res://the_gates/scripts/ui/menu/menu_animation.gd" id="7_ljms6"] [ext_resource type="Texture2D" uid="uid://bpj05amcrq1cq" path="res://the_gates/textures/slide-up.png" id="7_qsgsx"] [ext_resource type="Script" path="res://the_gates/scripts/ui/menu/bookmark_container.gd" id="7_wj13t"] -[ext_resource type="PackedScene" path="res://the_gates/scenes/components/bookmark.tscn" id="8_h7tks"] +[ext_resource type="PackedScene" uid="uid://82ca8so31njy" path="res://the_gates/scenes/components/bookmark.tscn" id="8_h7tks"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pveoh"] @@ -237,10 +237,9 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_pveoh") layout_mode = 0 anchor_right = 1.0 anchor_bottom = 1.0 -offset_bottom = 120.0 grow_horizontal = 2 grow_vertical = 2 -texture = ExtResource("3_6p5p0") +texture = ExtResource("1_uidjl") expand_mode = 1 stretch_mode = 6 metadata/_edit_lock_ = true diff --git a/project/the_gates/scenes/world.tscn b/project/the_gates/scenes/world.tscn index 2b9022a..4449a25 100644 --- a/project/the_gates/scenes/world.tscn +++ b/project/the_gates/scenes/world.tscn @@ -14,8 +14,8 @@ [ext_resource type="Texture2D" uid="uid://c5hu6cmvuipg7" path="res://the_gates/textures/star_filled.png" id="8_gho7k"] [ext_resource type="Resource" uid="uid://bewhdj6jugt6q" path="res://the_gates/resources/bookmarks.tres" id="8_wox3p"] [ext_resource type="Texture2D" uid="uid://c26q840lwxw8j" path="res://the_gates/textures/exit.png" id="9_63xhv"] +[ext_resource type="Texture2D" uid="uid://cykx425p6ylwr" path="res://the_gates/textures/background.png" id="9_req2b"] [ext_resource type="Script" path="res://the_gates/scripts/ui/world/release_focus.gd" id="10_6a8ws"] -[ext_resource type="Texture2D" uid="uid://bj8xlyxihfske" path="res://the_gates/textures/background.jpg" id="10_v058a"] [ext_resource type="PackedScene" path="res://the_gates/scenes/components/hint.tscn" id="11_cltj4"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_shmbc"] @@ -79,6 +79,7 @@ gate_events = ExtResource("2_ot8b0") script = ExtResource("1_5swiq") gate_events = ExtResource("2_ot8b0") render_result = NodePath("../../WorldCanvas/RenderResult") +splash_screen = ExtResource("9_req2b") [node name="UICanvas" type="CanvasLayer" parent="."] follow_viewport_enabled = true @@ -239,7 +240,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -texture = ExtResource("10_v058a") +texture = ExtResource("9_req2b") expand_mode = 1 stretch_mode = 6 diff --git a/project/the_gates/scripts/loading/pack_loader.gd b/project/the_gates/scripts/loading/pack_loader.gd index 9c9dbed..d361248 100644 --- a/project/the_gates/scripts/loading/pack_loader.gd +++ b/project/the_gates/scripts/loading/pack_loader.gd @@ -3,6 +3,7 @@ class_name PackLoader @export var gate_events: GateEvents @export var render_result: TextureRect +@export var splash_screen: Texture2D var gate: Gate var pid: int @@ -59,13 +60,17 @@ func create_process(_gate: Gate) -> void: func create_external_texture() -> int: var t_format: RDTextureFormat = RDTextureFormat.new() t_format.format = RenderingDevice.DATA_FORMAT_R8G8B8A8_UNORM - t_format.usage_bits = RenderingDevice.TEXTURE_USAGE_CAN_COPY_FROM_BIT + t_format.usage_bits = RenderingDevice.TEXTURE_USAGE_CAN_COPY_FROM_BIT | \ + RenderingDevice.TEXTURE_USAGE_CAN_UPDATE_BIT t_format.width = width t_format.height = height t_format.depth = 1 var t_view: RDTextureView = RDTextureView.new() - ext_texure_rid = rd.create_external_texture(t_format, t_view) + var image = splash_screen.get_image() + image.convert(Image.FORMAT_RGBA8) + image.clear_mipmaps() + ext_texure_rid = rd.create_external_texture(t_format, t_view, [image.get_data()]) return rd.get_external_texture_fd(ext_texure_rid) diff --git a/project/the_gates/textures/background.jpg b/project/the_gates/textures/background.jpg deleted file mode 100755 index 6d0ec1d..0000000 Binary files a/project/the_gates/textures/background.jpg and /dev/null differ diff --git a/project/the_gates/textures/background.png b/project/the_gates/textures/background.png new file mode 100644 index 0000000..bfbcfc5 Binary files /dev/null and b/project/the_gates/textures/background.png differ diff --git a/project/the_gates/textures/background.jpg.import b/project/the_gates/textures/background.png.import similarity index 64% rename from project/the_gates/textures/background.jpg.import rename to project/the_gates/textures/background.png.import index ef2ff34..8607755 100644 --- a/project/the_gates/textures/background.jpg.import +++ b/project/the_gates/textures/background.png.import @@ -2,23 +2,23 @@ importer="texture" type="CompressedTexture2D" -uid="uid://bj8xlyxihfske" -path="res://.godot/imported/background.jpg-a1ed70f136d4640d0867221bacee7cad.ctex" +uid="uid://cykx425p6ylwr" +path="res://.godot/imported/background.png-efe0ff795f34177e7f784c17fa119300.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://the_gates/textures/background.jpg" -dest_files=["res://.godot/imported/background.jpg-a1ed70f136d4640d0867221bacee7cad.ctex"] +source_file="res://the_gates/textures/background.png" +dest_files=["res://.godot/imported/background.png-efe0ff795f34177e7f784c17fa119300.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true