mirror of
https://github.com/godotengine/godot.git
synced 2024-12-04 01:52:56 +00:00
81064cc239
We don't use that info for anything, and it generates unnecessary diffs every time we bump the minor version (and CI failures if we forget to sync some files from opt-in modules (mono, text_server_fb).
31 lines
2.0 KiB
XML
31 lines
2.0 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="VisibleOnScreenEnabler2D" inherits="VisibleOnScreenNotifier2D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<brief_description>
|
|
Automatically disables another node if not visible on screen.
|
|
</brief_description>
|
|
<description>
|
|
VisibleOnScreenEnabler2D detects when it is visible on screen (just like [VisibleOnScreenNotifier2D]) and automatically enables or disables the target node. The target node is disabled when [VisibleOnScreenEnabler2D] is not visible on screen (including when [member CanvasItem.visible] is [code]false[/code]), and enabled when the enabler is visible. The disabling is achieved by changing [member Node.process_mode].
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<members>
|
|
<member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler2D.EnableMode" default="0">
|
|
Determines how the node is enabled. Corresponds to [enum Node.ProcessMode]. Disabled node uses [constant Node.PROCESS_MODE_DISABLED].
|
|
</member>
|
|
<member name="enable_node_path" type="NodePath" setter="set_enable_node_path" getter="get_enable_node_path" default="NodePath("..")">
|
|
The path to the target node, relative to the [VisibleOnScreenEnabler2D]. The target node is cached; it's only assigned when setting this property (if the [VisibleOnScreenEnabler2D] is inside scene tree) and every time the [VisibleOnScreenEnabler2D] enters the scene tree. If the path is invalid, nothing will happen.
|
|
</member>
|
|
</members>
|
|
<constants>
|
|
<constant name="ENABLE_MODE_INHERIT" value="0" enum="EnableMode">
|
|
Corresponds to [constant Node.PROCESS_MODE_INHERIT].
|
|
</constant>
|
|
<constant name="ENABLE_MODE_ALWAYS" value="1" enum="EnableMode">
|
|
Corresponds to [constant Node.PROCESS_MODE_ALWAYS].
|
|
</constant>
|
|
<constant name="ENABLE_MODE_WHEN_PAUSED" value="2" enum="EnableMode">
|
|
Corresponds to [constant Node.PROCESS_MODE_WHEN_PAUSED].
|
|
</constant>
|
|
</constants>
|
|
</class>
|