diff options
author | Spartan322 <Megacake1234@gmail.com> | 2023-07-01 00:35:16 +0200 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2023-07-06 11:35:15 +0200 |
commit | 18ff6fb2fa03335d8a42440aec9f0dcb77f42c3a (patch) | |
tree | f81a638162670bbb817b7b8d49ea2717ed3d3c4f /game/src | |
parent | 432000a3ab73980fc6421b3587de4b97af30d3ad (diff) |
Update to Godot 4.1 Stable Release
Fix deferred error in LoadingScreen.update_loading_screen
Fix pressed shadow variable warning in SettingCheckBox.gd
Diffstat (limited to 'game/src')
-rw-r--r-- | game/src/Game/LoadingScreen.gd | 2 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd | 2 |
2 files changed, 3 insertions, 1 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()] diff --git a/game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd b/game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd index fcc411e..344a2b5 100644 --- a/game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd +++ b/game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd @@ -19,7 +19,7 @@ func _ready(): Events.Options.load_settings.connect(load_setting) Events.Options.save_settings.connect(save_setting) Events.Options.reset_settings.connect(reset_setting) - toggled.connect(func(pressed : bool): option_selected.emit(pressed, true)) + toggled.connect(func(p : bool): option_selected.emit(p, true)) _setup_button() func _set_value_from_file(load_value) -> void: |