From ed46252e4aec76473ff1f773a75ba1a5e9c4d5e9 Mon Sep 17 00:00:00 2001 From: xorblo-doitus <75997617+xorblo-doitus@users.noreply.github.com> Date: Sun, 27 Oct 2024 09:18:53 +0100 Subject: [PATCH] Add `ESL.value_updated` signal --- addons/easy_settings/listeners/base/esl.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/easy_settings/listeners/base/esl.gd b/addons/easy_settings/listeners/base/esl.gd index 65873b6..c398608 100644 --- a/addons/easy_settings/listeners/base/esl.gd +++ b/addons/easy_settings/listeners/base/esl.gd @@ -7,6 +7,9 @@ class_name ESL ## Implements virtual methods +signal value_updated(new_value, old_value) + + ## The way to sync this ESL when the setting is modified by an external source enum Sync { ALWAYS, ## The value must always be the same as the setting @@ -94,6 +97,7 @@ func _update_value(new_value, old_value: Variant) -> void: if _ignore_update or sync == Sync.NEVER: return update_value(new_value, old_value) + value_updated.emit(new_value, old_value) func _create_save_debounce_timer() -> void: