summaryrefslogtreecommitdiff
path: root/editor/editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r--editor/editor_plugin.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 1f2e73654c..1ad23963a9 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -503,17 +503,17 @@ bool EditorPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) {
return false;
}
-void EditorPlugin::forward_draw_over_viewport(Control *p_overlay) {
+void EditorPlugin::forward_canvas_draw_over_viewport(Control *p_overlay) {
- if (get_script_instance() && get_script_instance()->has_method("forward_draw_over_viewport")) {
- get_script_instance()->call("forward_draw_over_viewport", p_overlay);
+ if (get_script_instance() && get_script_instance()->has_method("forward_canvas_draw_over_viewport")) {
+ get_script_instance()->call("forward_canvas_draw_over_viewport", p_overlay);
}
}
-void EditorPlugin::forward_force_draw_over_viewport(Control *p_overlay) {
+void EditorPlugin::forward_canvas_force_draw_over_viewport(Control *p_overlay) {
- if (get_script_instance() && get_script_instance()->has_method("forward_force_draw_over_viewport")) {
- get_script_instance()->call("forward_force_draw_over_viewport", p_overlay);
+ if (get_script_instance() && get_script_instance()->has_method("forward_canvas_force_draw_over_viewport")) {
+ get_script_instance()->call("forward_canvas_force_draw_over_viewport", p_overlay);
}
}
@@ -545,6 +545,20 @@ bool EditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Ref<InputEv
return false;
}
+
+void EditorPlugin::forward_spatial_draw_over_viewport(Control *p_overlay) {
+
+ if (get_script_instance() && get_script_instance()->has_method("forward_spatial_draw_over_viewport")) {
+ get_script_instance()->call("forward_spatial_draw_over_viewport", p_overlay);
+ }
+}
+
+void EditorPlugin::forward_spatial_force_draw_over_viewport(Control *p_overlay) {
+
+ if (get_script_instance() && get_script_instance()->has_method("forward_spatial_force_draw_over_viewport")) {
+ get_script_instance()->call("forward_spatial_force_draw_over_viewport", p_overlay);
+ }
+}
String EditorPlugin::get_name() const {
if (get_script_instance() && get_script_instance()->has_method("get_plugin_name")) {
@@ -769,8 +783,8 @@ void EditorPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_script_create_dialog"), &EditorPlugin::get_script_create_dialog);
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_canvas_gui_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_force_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_canvas_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_canvas_force_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_spatial_gui_input", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_plugin_name"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::OBJECT, "get_plugin_icon"));