|
@@ -190,6 +190,13 @@ void SubViewportContainer::_propagate_nonpositional_event(const Ref<InputEvent>
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ bool send;
|
|
|
+ if (GDVIRTUAL_CALL(_propagate_input_event, p_event, send)) {
|
|
|
+ if (!send) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
_send_event_to_viewports(p_event);
|
|
|
}
|
|
|
|
|
@@ -204,6 +211,13 @@ void SubViewportContainer::gui_input(const Ref<InputEvent> &p_event) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ bool send;
|
|
|
+ if (GDVIRTUAL_CALL(_propagate_input_event, p_event, send)) {
|
|
|
+ if (!send) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (stretch && shrink > 1) {
|
|
|
Transform2D xform;
|
|
|
xform.scale(Vector2(1, 1) / shrink);
|
|
@@ -275,6 +289,8 @@ void SubViewportContainer::_bind_methods() {
|
|
|
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stretch"), "set_stretch", "is_stretch_enabled");
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "stretch_shrink"), "set_stretch_shrink", "get_stretch_shrink");
|
|
|
+
|
|
|
+ GDVIRTUAL_BIND(_propagate_input_event, "event");
|
|
|
}
|
|
|
|
|
|
SubViewportContainer::SubViewportContainer() {
|