Enable filtering InputEvent-sending in SubViewportContainer

Introduce an user overridable function, that allows filtering, if
an `InputEvent` should be sent to `SubViewport` children.
This commit is contained in:
Markus Sauermann
2023-06-27 20:05:39 +02:00
parent 0ca8542329
commit 781cecdc23
3 changed files with 27 additions and 0 deletions

View File

@@ -10,6 +10,15 @@
</description>
<tutorials>
</tutorials>
<methods>
<method name="_propagate_input_event" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="event" type="InputEvent" />
<description>
Virtual method to be implemented by the user. If it returns [code]true[/code], the [param event] is propagated to [SubViewport] children. Propagation doesn't happen if it returns [code]false[/code]. If the function is not implemented, all events are propagated to SubViewports.
</description>
</method>
</methods>
<members>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="1" />
<member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled" default="false">