diff options
| author | Pedro J. Estébanez | 2017-10-29 20:32:09 +0100 |
|---|---|---|
| committer | Pedro J. Estébanez | 2017-11-24 21:24:15 +0100 |
| commit | 3f31925b180dd0bfd2601c20d7200b9b152b12ef (patch) | |
| tree | 831e4c714d45d7b6d789421b4ba99acd395130bc /editor/plugins/tile_map_editor_plugin.h | |
| parent | 2e5dfbdb4beb52d021e89058ab64eac1a95d77b2 (diff) | |
| download | godot-3f31925b180dd0bfd2601c20d7200b9b152b12ef.tar.gz godot-3f31925b180dd0bfd2601c20d7200b9b152b12ef.tar.zst godot-3f31925b180dd0bfd2601c20d7200b9b152b12ef.zip | |
Universalize draw-over API for EditorPlugins
- Now it is usable from both `CanvasItem` and `Spatial` editors.
- `EditorPlugin` API changes:
- `forward_draw_over_canvas()` becomes `forward_draw_over_viewport()`.
- `update_canvas()` becomes `update_overlays()`, which now triggers the update of every overlay on top of any 2D or 3D viewports present. Also now it returns the number of such viewports, which is useful whenever you need to know the number of draw-over calls you'll get.
- New: `[set/is]_force_draw_over_forwarding_enabled()` to force overlaying regardless it handles the current object type, in a similar fashion as `[set/is]_input_event_forwarding_always_enabled`. This kind of overlay is also on top of those for regular handled node types.
- New: `forward_force_draw_over_canvas()`, which is the callback that gets called for plugins that enable forced overlaying.
Diffstat (limited to '')
| -rw-r--r-- | editor/plugins/tile_map_editor_plugin.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h index c7a5bf0cc..ce58cc970 100644 --- a/editor/plugins/tile_map_editor_plugin.h +++ b/editor/plugins/tile_map_editor_plugin.h @@ -184,7 +184,7 @@ public: HBoxContainer *get_toolbar() const { return toolbar; } bool forward_gui_input(const Ref<InputEvent> &p_event); - void forward_draw_over_canvas(Control *p_canvas); + void forward_draw_over_viewport(Control *p_overlay); void edit(Node *p_tile_map); @@ -200,7 +200,7 @@ class TileMapEditorPlugin : public EditorPlugin { public: virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return tile_map_editor->forward_gui_input(p_event); } - virtual void forward_draw_over_canvas(Control *p_canvas) { tile_map_editor->forward_draw_over_canvas(p_canvas); } + virtual void forward_draw_over_viewport(Control *p_overlay) { tile_map_editor->forward_draw_over_viewport(p_overlay); } virtual String get_name() const { return "TileMap"; } bool has_main_screen() const { return false; } |
