From cdbb31adc9fc5b44bd0304af5e3678e51d43d2b1 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 14 Mar 2022 17:14:57 +0100 Subject: Document Range's `value_changed` signal is also emitted with code changes This also mentions that the signal is potentially emitted every frame, which can have performance implications. --- doc/classes/Range.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index c150198eb1..8f23c54a2a 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -13,19 +13,20 @@ + Called when the [Range]'s value is changed (following the same conditions as [signal value_changed]). - Binds two ranges together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group. + Binds two [Range]s together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group. - Stops range from sharing its member variables with any other. + Stops the [Range] from sharing its member variables with any other. @@ -70,7 +71,8 @@ - Emitted when [member value] changes. + Emitted when [member value] changes. When used on a [Slider], this is called continuously while dragging (potentially every frame). If you are performing an expensive operation in a function connected to [signal value_changed], consider using a [i]debouncing[/i] [Timer] to call the function less often. + [b]Note:[/b] Unlike signals such as [signal LineEdit.text_changed], [signal value_changed] is also emitted when [code]value[/code] is set directly via code. -- cgit v1.2.3