diff options
author | Thomas Herzog <karroffel@users.noreply.github.com> | 2017-06-19 22:43:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 22:43:33 +0200 |
commit | 6b93455b6b8c3c684a8e4b4b09dc54ca30f15c94 (patch) | |
tree | 9c9fd83c81b82143283c75c278d12c7fd547d113 /editor/plugins | |
parent | d9a3cef18e84a93301ad20f35f3d35c656c5f998 (diff) | |
parent | d8b65b16576a2d91b3a237fd25e7369df97c0e5c (diff) |
Merge pull request #9099 from kubecz3k/plugin-camera-expose
EditorPlugin can request user inputs from editor 3d view
Diffstat (limited to 'editor/plugins')
-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 5da242ffaa..2d27e218ec 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; } |