diff options
author | BrickPi <49528459+BrickPi@users.noreply.github.com> | 2023-08-21 02:14:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 02:14:40 +0200 |
commit | f59424ee1223bd509efdb2162b16415708a1ff6a (patch) | |
tree | 9c107da9e75e09231824f34b5583b3b1c0b03c13 | |
parent | 00426f3ab57e7a06a92f3aeac6466a403a933f80 (diff) | |
parent | dfa73f753143adc408ff9479b8ccfb4a837c9588 (diff) |
Merge pull request #149 from BrickPi/master
Finish Loading Screen (implements UI-24)
-rw-r--r-- | game/splash_assets/globe.png | bin | 0 -> 48541 bytes | |||
-rw-r--r-- | game/splash_assets/globe.png.import | 34 | ||||
-rw-r--r-- | game/splash_assets/ovgear.png | bin | 0 -> 37616 bytes | |||
-rw-r--r-- | game/splash_assets/ovgear.png.import | 34 | ||||
-rw-r--r-- | game/src/Game/LoadingScreen.gd | 2 | ||||
-rw-r--r-- | game/src/Game/LoadingScreen.tscn | 83 |
6 files changed, 151 insertions, 2 deletions
diff --git a/game/splash_assets/globe.png b/game/splash_assets/globe.png Binary files differnew file mode 100644 index 0000000..f925d35 --- /dev/null +++ b/game/splash_assets/globe.png diff --git a/game/splash_assets/globe.png.import b/game/splash_assets/globe.png.import new file mode 100644 index 0000000..784d8e8 --- /dev/null +++ b/game/splash_assets/globe.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://oirhxlyiogv8" +path="res://.godot/imported/globe.png-00352f839f02a64dea5126a54e3e9b2b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://splash_assets/globe.png" +dest_files=["res://.godot/imported/globe.png-00352f839f02a64dea5126a54e3e9b2b.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 diff --git a/game/splash_assets/ovgear.png b/game/splash_assets/ovgear.png Binary files differnew file mode 100644 index 0000000..d18b437 --- /dev/null +++ b/game/splash_assets/ovgear.png diff --git a/game/splash_assets/ovgear.png.import b/game/splash_assets/ovgear.png.import new file mode 100644 index 0000000..ee67bb8 --- /dev/null +++ b/game/splash_assets/ovgear.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://hlouxrjm7pqy" +path="res://.godot/imported/ovgear.png-b0a02a64494ec794cdac3fbababcd544.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://splash_assets/ovgear.png" +dest_files=["res://.godot/imported/ovgear.png-b0a02a64494ec794cdac3fbababcd544.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 diff --git a/game/src/Game/LoadingScreen.gd b/game/src/Game/LoadingScreen.gd index d953d20..ae04c85 100644 --- a/game/src/Game/LoadingScreen.gd +++ b/game/src/Game/LoadingScreen.gd @@ -5,6 +5,7 @@ extends Control @export_subgroup("Nodes") @export var progress_bar: ProgressBar @export var quote_label: Label +@export var animation_player: AnimationPlayer var thread: Thread var quotes: PackedStringArray = [] @@ -42,6 +43,7 @@ func _ready(): quotes = quotes_file.split("\n",false) if quotes.is_empty(): quotes = [""] + animation_player.play("loadingscreen_gear") func _exit_tree(): if thread != null and thread.is_started(): diff --git a/game/src/Game/LoadingScreen.tscn b/game/src/Game/LoadingScreen.tscn index d6068c8..5ae1cb9 100644 --- a/game/src/Game/LoadingScreen.tscn +++ b/game/src/Game/LoadingScreen.tscn @@ -1,7 +1,9 @@ -[gd_scene load_steps=6 format=3 uid="uid://3kktdpfnc0sn"] +[gd_scene load_steps=11 format=3 uid="uid://3kktdpfnc0sn"] [ext_resource type="Script" path="res://src/Game/LoadingScreen.gd" id="1_b0p3w"] [ext_resource type="Texture2D" uid="uid://doji17mxxmikl" path="res://theme/assets/loading_screen.png" id="2_ny153"] +[ext_resource type="Texture2D" uid="uid://hlouxrjm7pqy" path="res://splash_assets/ovgear.png" id="3_avohi"] +[ext_resource type="Texture2D" uid="uid://oirhxlyiogv8" path="res://splash_assets/globe.png" id="4_eyeeb"] [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_3fggo"] texture = ExtResource("2_ny153") @@ -20,7 +22,43 @@ corner_radius_top_right = 16 corner_radius_bottom_right = 16 corner_radius_bottom_left = 16 -[node name="LoadingScreen" type="Control" node_paths=PackedStringArray("progress_bar", "quote_label")] +[sub_resource type="Animation" id="Animation_wsrst"] +length = 0.001 +tracks/0/type = "bezier" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Gear:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"handle_modes": PackedInt32Array(0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0) +} + +[sub_resource type="Animation" id="Animation_3ktkq"] +resource_name = "loadingscreen_gear" +length = 5.0 +loop_mode = 1 +tracks/0/type = "bezier" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Gear:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"handle_modes": PackedInt32Array(0, 0), +"points": PackedFloat32Array(0, 0, 0, 0, 0, 6.28319, 0, 0, 0, 0), +"times": PackedFloat32Array(0, 5) +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_wo8l0"] +_data = { +"RESET": SubResource("Animation_wsrst"), +"loadingscreen_gear": SubResource("Animation_3ktkq") +} + +[node name="LoadingScreen" type="Control" node_paths=PackedStringArray("progress_bar", "quote_label", "animation_player")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -30,6 +68,7 @@ grow_vertical = 2 script = ExtResource("1_b0p3w") progress_bar = NodePath("PanelContainer/MarginContainer/ProgressBar") quote_label = NodePath("PanelContainer/MarginContainer/PanelContainer/QuoteLabel") +animation_player = NodePath("AnimationPlayer") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 1 @@ -68,3 +107,43 @@ horizontal_alignment = 1 vertical_alignment = 1 autowrap_mode = 3 text_overrun_behavior = 3 + +[node name="Gear" type="TextureRect" 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 = -128.0 +offset_top = -128.0 +offset_right = 128.0 +offset_bottom = 128.0 +grow_horizontal = 2 +grow_vertical = 2 +pivot_offset = Vector2(128, 128) +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("3_avohi") +expand_mode = 1 + +[node name="Globe" type="TextureRect" 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 = -88.0 +offset_top = -87.0 +offset_right = 86.0 +offset_bottom = 86.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("4_eyeeb") +expand_mode = 1 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_wo8l0") +} |