diff --git a/assets/GUI/loading_screens/new_loading_bg_0.tga b/assets/GUI/loading_screens/new_loading_bg_0.tga index 82c2b82..fa7ed64 100644 Binary files a/assets/GUI/loading_screens/new_loading_bg_0.tga and b/assets/GUI/loading_screens/new_loading_bg_0.tga differ diff --git a/assets/GUI/loading_screens/new_loading_bg_1.tga b/assets/GUI/loading_screens/new_loading_bg_1.tga index 2374562..6fd6a3d 100644 Binary files a/assets/GUI/loading_screens/new_loading_bg_1.tga and b/assets/GUI/loading_screens/new_loading_bg_1.tga differ diff --git a/assets/GUI/loading_screens/new_loading_bg_test.tga b/assets/GUI/loading_screens/new_loading_bg_test.tga deleted file mode 100644 index 2db5bb3..0000000 Binary files a/assets/GUI/loading_screens/new_loading_bg_test.tga and /dev/null differ diff --git a/scenes/Game/Game.tscn b/scenes/Game/Game.tscn index fe36a53..255a6bc 100644 --- a/scenes/Game/Game.tscn +++ b/scenes/Game/Game.tscn @@ -1194,7 +1194,6 @@ _sections_unfolded = [ "Transform" ] [node name="CubeShaderTest" parent="World" index="7" instance=ExtResource( 8 )] -editor/display_folded = true transform = Transform( -0.471909, 0, -0.881647, 0, 1, 0, 0.881647, 0, -0.471909, 4, 2, 3.11353 ) friction = 0.2 bounce = 0.75 diff --git a/scenes/Main.tscn b/scenes/Main.tscn index cdeb1de..3b54dca 100644 --- a/scenes/Main.tscn +++ b/scenes/Main.tscn @@ -2,7 +2,7 @@ [ext_resource path="res://scenes/Main.gd" type="Script" id=1] [ext_resource path="res://login_scene/login_scene.tscn" type="PackedScene" id=2] -[ext_resource path="res://assets/GUI/loading_screens/new_loading_bg_test.tga" type="Texture" id=3] +[ext_resource path="res://assets/GUI/loading_screens/new_loading_bg_1.tga" type="Texture" id=3] [node name="Main" type="Node" index="0"] @@ -13,7 +13,6 @@ _sections_unfolded = [ "Pause" ] [node name="background_loader" type="Panel" parent="." index="1"] -visible = false self_modulate = Color( 0, 0, 0, 1 ) anchor_left = 0.0 anchor_top = 0.0 @@ -57,7 +56,7 @@ size_flags_horizontal = 5 size_flags_vertical = 5 texture = ExtResource( 3 ) expand = true -stretch_mode = 7 +stretch_mode = 6 _sections_unfolded = [ "Rect", "Size Flags" ] [node name="progress_bar" type="ProgressBar" parent="background_loader/center_container" index="1"] @@ -79,11 +78,11 @@ size_flags_horizontal = 6 size_flags_vertical = 10 min_value = 0.0 max_value = 100.0 -step = 1.0 +step = 0.1 page = 0.0 value = 0.0 exp_edit = false -rounded = true +rounded = false percent_visible = true _sections_unfolded = [ "Margin", "Rect", "Size Flags" ] diff --git a/scenes/global.gd b/scenes/global.gd index 600caeb..60684ee 100644 --- a/scenes/global.gd +++ b/scenes/global.gd @@ -55,14 +55,17 @@ func _process(time): # poll your loader var err = loader.poll() + update_progress() if err == ERR_FILE_EOF: # load finished +# update_progress() var resource = loader.get_resource() loader = null set_new_scene( resource ) break elif err == OK: - update_progress() +# update_progress() + pass else: # error during loading show_error() loader = null @@ -70,9 +73,11 @@ func _process(time): func update_progress(): print("test: "+str(loader.get_stage())+" / "+str(loader.get_stage_count()) ) - var progress = int( (float(loader.get_stage()) / loader.get_stage_count()) *100 ) + + var progress_bar = get_tree().get_root().get_node("Main/background_loader/center_container/progress_bar") + var progress = (float(loader.get_stage()) / loader.get_stage_count()) * progress_bar.max_value # update your progress bar? - get_tree().get_root().get_node("Main/background_loader/center_container/progress_bar").value = progress + progress_bar.value = progress # or update a progress animation?