diff options
author | Unknown <kubecz3k@gmail.com> | 2017-06-08 19:57:35 +0200 |
---|---|---|
committer | kubeczek <kubecz3k@gmail.com> | 2017-06-12 17:55:15 +0200 |
commit | d8b65b16576a2d91b3a237fd25e7369df97c0e5c (patch) | |
tree | 3753a9c4631f41cfd491aed4c04df98527d9e599 /editor/plugins/spatial_editor_plugin.cpp | |
parent | d4e64e0e60ee9377bedb1c3324bd346abc129aae (diff) | |
download | redot-engine-d8b65b16576a2d91b3a237fd25e7369df97c0e5c.tar.gz |
EditorPlugin can request user inputs from editor 3d view
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 7b8a4a89d4..f85906d802 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -696,12 +696,19 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { return; //do NONE { - + EditorNode *en = editor; + EditorPluginList *force_input_forwarding_list = en->get_editor_plugins_force_input_forwarding(); + if (!force_input_forwarding_list->empty()) { + bool discard = force_input_forwarding_list->forward_spatial_gui_input(camera, p_event, true); + if (discard) + return; + } + } + { EditorNode *en = editor; EditorPluginList *over_plugin_list = en->get_editor_plugins_over(); - if (!over_plugin_list->empty()) { - bool discard = over_plugin_list->forward_spatial_gui_input(camera, p_event); + bool discard = over_plugin_list->forward_spatial_gui_input(camera, p_event, false); if (discard) return; } |