From 640099cce5e496b8bd3480fab37ea6cc87d39c33 Mon Sep 17 00:00:00 2001 From: Jason Knight Date: Sun, 20 Mar 2022 07:59:15 -0600 Subject: [PATCH] Bind NOTIFICATION_LOCAL_TRANFORM_CHANGED --- doc/classes/CanvasItem.xml | 9 ++++++--- scene/main/canvas_item.cpp | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 060d685ece6..1fe2f5a756e 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -439,14 +439,14 @@ - If [code]enable[/code] is [code]true[/code], children will be updated with local transform data. + If [code]enable[/code] is [code]true[/code], this node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] when its local transform changes. - If [code]enable[/code] is [code]true[/code], children will be updated with global transform data. + If [code]enable[/code] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes. @@ -524,7 +524,10 @@ - The [CanvasItem]'s transform has changed. This notification is only received if enabled by [method set_notify_transform] or [method set_notify_local_transform]. + The [CanvasItem]'s global transform has changed. This notification is only received if enabled by [method set_notify_transform]. + + + The [CanvasItem]'s local transform has changed. This notification is only received if enabled by [method set_notify_local_transform]. The [CanvasItem] is requested to draw. diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp index b50f7866aff..15d36d8230f 100644 --- a/scene/main/canvas_item.cpp +++ b/scene/main/canvas_item.cpp @@ -978,6 +978,7 @@ void CanvasItem::_bind_methods() { ADD_SIGNAL(MethodInfo("item_rect_changed")); BIND_CONSTANT(NOTIFICATION_TRANSFORM_CHANGED); + BIND_CONSTANT(NOTIFICATION_LOCAL_TRANSFORM_CHANGED); BIND_CONSTANT(NOTIFICATION_DRAW); BIND_CONSTANT(NOTIFICATION_VISIBILITY_CHANGED); BIND_CONSTANT(NOTIFICATION_ENTER_CANVAS);