diff options
| author | Juan Linietsky | 2016-09-10 16:44:03 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-09-10 16:44:03 -0300 |
| commit | 491dde2eb46a3d5af60256a21a23d6c32e4bfa46 (patch) | |
| tree | 7bf71d49ec7290294c330508fb59d0f8ca41b6da /tools/editor/plugins/canvas_item_editor_plugin.cpp | |
| parent | 67d3935eb17110d71235f52d1b2040f06c8f2b23 (diff) | |
| download | godot-491dde2eb46a3d5af60256a21a23d6c32e4bfa46.tar.gz godot-491dde2eb46a3d5af60256a21a23d6c32e4bfa46.tar.zst godot-491dde2eb46a3d5af60256a21a23d6c32e4bfa46.zip | |
Made it possible to properly draw over the 2D canvas for 2D objects. Arranged some functions to achieve this.
Diffstat (limited to 'tools/editor/plugins/canvas_item_editor_plugin.cpp')
| -rw-r--r-- | tools/editor/plugins/canvas_item_editor_plugin.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
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"); |
