From 491dde2eb46a3d5af60256a21a23d6c32e4bfa46 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 10 Sep 2016 16:44:03 -0300 Subject: Made it possible to properly draw over the 2D canvas for 2D objects. Arranged some functions to achieve this. --- tools/editor/plugins/canvas_item_editor_plugin.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tools/editor/plugins/canvas_item_editor_plugin.cpp') diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 3468f42a6..b0e002ba4 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -1058,7 +1058,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) { EditorPluginList *over_plugin_list = en->get_editor_plugins_over(); if (!over_plugin_list->empty()) { - bool discard = over_plugin_list->forward_input_event(p_event); + bool discard = over_plugin_list->forward_input_event(transform,p_event); if (discard) { accept_event(); return; @@ -2090,6 +2090,18 @@ void CanvasItemEditor::_viewport_draw() { } + { + + EditorNode *en = editor; + EditorPluginList *over_plugin_list = en->get_editor_plugins_over(); + + if (!over_plugin_list->empty()) { + + over_plugin_list->forward_draw_over_canvas(transform,viewport); + + } + } + if (skeleton_show_bones) { int bone_width = EditorSettings::get_singleton()->get("2d_editor/bone_width"); Color bone_color1 = EditorSettings::get_singleton()->get("2d_editor/bone_color1"); -- cgit v1.3.1