summaryrefslogtreecommitdiff
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index a8fdca1b20..5fd0a41788 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -6928,7 +6928,7 @@ EditorNode::EditorNode() {
add_child(editor_interface);
//more visually meaningful to have this later
- raise_bottom_panel_item(AnimationPlayerEditor::singleton);
+ raise_bottom_panel_item(AnimationPlayerEditor::get_singleton());
add_editor_plugin(VersionControlEditorPlugin::get_singleton());
add_editor_plugin(memnew(ShaderEditorPlugin(this)));
@@ -7202,20 +7202,24 @@ bool EditorPluginList::forward_gui_input(const Ref<InputEvent> &p_event) {
return discard;
}
-bool EditorPluginList::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event, bool serve_when_force_input_enabled) {
- bool discard = false;
+EditorPlugin::AfterGUIInput EditorPluginList::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event, bool serve_when_force_input_enabled) {
+ EditorPlugin::AfterGUIInput after = EditorPlugin::AFTER_GUI_INPUT_PASS;
for (int i = 0; i < plugins_list.size(); i++) {
if ((!serve_when_force_input_enabled) && plugins_list[i]->is_input_event_forwarding_always_enabled()) {
continue;
}
- if (plugins_list[i]->forward_spatial_gui_input(p_camera, p_event)) {
- discard = true;
+ EditorPlugin::AfterGUIInput current_after = plugins_list[i]->forward_spatial_gui_input(p_camera, p_event);
+ if (current_after == EditorPlugin::AFTER_GUI_INPUT_STOP) {
+ after = EditorPlugin::AFTER_GUI_INPUT_STOP;
+ }
+ if (after != EditorPlugin::AFTER_GUI_INPUT_STOP && current_after == EditorPlugin::AFTER_GUI_INPUT_DESELECT) {
+ after = EditorPlugin::AFTER_GUI_INPUT_DESELECT;
}
}
- return discard;
+ return after;
}
void EditorPluginList::forward_canvas_draw_over_viewport(Control *p_overlay) {