aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/LoadingScreen.gd
diff options
context:
space:
mode:
author BrickPi <49528459+BrickPi@users.noreply.github.com>2023-07-06 22:36:49 +0200
committer GitHub <noreply@github.com>2023-07-06 22:36:49 +0200
commit5838c2508682bc3f6e35e44056f9ba229bca4571 (patch)
treef81a638162670bbb817b7b8d49ea2717ed3d3c4f /game/src/Game/LoadingScreen.gd
parent432000a3ab73980fc6421b3587de4b97af30d3ad (diff)
parent18ff6fb2fa03335d8a42440aec9f0dcb77f42c3a (diff)
Merge pull request #134 from OpenVicProject/godot-4.1
Update to Godot 4.1
Diffstat (limited to 'game/src/Game/LoadingScreen.gd')
-rw-r--r--game/src/Game/LoadingScreen.gd2
1 files changed, 2 insertions, 0 deletions
diff --git a/game/src/Game/LoadingScreen.gd b/game/src/Game/LoadingScreen.gd
index 14acbd7..9d44b41 100644
--- a/game/src/Game/LoadingScreen.gd
+++ b/game/src/Game/LoadingScreen.gd
@@ -8,6 +8,8 @@ var loadthread: Thread
var quotes: PackedStringArray = []
func update_loading_screen(percent_complete: int, quote_should_change = false):
+ # forces the function to behave as if deferred
+ await get_tree().process_frame
progress_bar.value = percent_complete
if quote_should_change:
quote_label.text = quotes[randi() % quotes.size()]