Add a flag to make the connection automatically emit the source object.

Mainly used to improve the connection dialog.

Not implemented in `emit_signalp()`, append the source object when a PackScene is instantiated.
This commit is contained in:
Rindbee
2022-04-11 17:37:23 +08:00
committed by 风青山
parent 6c9765d87e
commit 5e2396e001
6 changed files with 95 additions and 21 deletions

View File

@@ -1039,5 +1039,8 @@
<constant name="CONNECT_REFERENCE_COUNTED" value="8" enum="ConnectFlags">
Reference-counted connections can be assigned to the same [Callable] multiple times. Each disconnection decreases the internal counter. The signal fully disconnects only when the counter reaches 0.
</constant>
<constant name="CONNECT_APPEND_SOURCE_OBJECT" value="16" enum="ConnectFlags">
The source object is automatically bound when a [PackedScene] is instantiated. If this flag bit is enabled, the source object will be appended right after the original arguments of the signal.
</constant>
</constants>
</class>