Merge pull request #59353 from winterpixelgames/3.x-notify-local-transform-constant

This commit is contained in:
Rémi Verschelde 2022-03-21 12:27:14 +01:00 committed by GitHub
commit 084062e0f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -384,14 +384,14 @@
<return type="void" />
<argument index="0" name="enable" type="bool" />
<description>
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.
</description>
</method>
<method name="set_notify_transform">
<return type="void" />
<argument index="0" name="enable" type="bool" />
<description>
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.
</description>
</method>
<method name="show">
@ -476,7 +476,10 @@
Disables blending mode. Colors including alpha are written as-is. Only applicable for render targets with a transparent background. No lighting will be applied.
</constant>
<constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000">
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].
</constant>
<constant name="NOTIFICATION_LOCAL_TRANSFORM_CHANGED" value="35">
The [CanvasItem]'s local transform has changed. This notification is only received if enabled by [method set_notify_local_transform].
</constant>
<constant name="NOTIFICATION_DRAW" value="30">
The [CanvasItem] is requested to draw.

View file

@ -1199,6 +1199,7 @@ void CanvasItem::_bind_methods() {
BIND_ENUM_CONSTANT(BLEND_MODE_DISABLED);
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);