diff options
Diffstat (limited to 'modules/gdnative')
-rw-r--r-- | modules/gdnative/gdnative_library_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | modules/gdnative/gdnative_library_editor_plugin.h | 3 | ||||
-rw-r--r-- | modules/gdnative/register_types.cpp | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp index 868e1b878c..2440ef392e 100644 --- a/modules/gdnative/gdnative_library_editor_plugin.cpp +++ b/modules/gdnative/gdnative_library_editor_plugin.cpp @@ -408,10 +408,10 @@ void GDNativeLibraryEditorPlugin::make_visible(bool p_visible) { } } -GDNativeLibraryEditorPlugin::GDNativeLibraryEditorPlugin(EditorNode *p_node) { +GDNativeLibraryEditorPlugin::GDNativeLibraryEditorPlugin() { library_editor = memnew(GDNativeLibraryEditor); library_editor->set_custom_minimum_size(Size2(0, 250 * EDSCALE)); - button = p_node->add_bottom_panel_item(TTR("GDNativeLibrary"), library_editor); + button = EditorNode::get_singleton()->add_bottom_panel_item(TTR("GDNativeLibrary"), library_editor); button->hide(); } diff --git a/modules/gdnative/gdnative_library_editor_plugin.h b/modules/gdnative/gdnative_library_editor_plugin.h index 8d007d207c..2e4b483ea7 100644 --- a/modules/gdnative/gdnative_library_editor_plugin.h +++ b/modules/gdnative/gdnative_library_editor_plugin.h @@ -103,7 +103,6 @@ class GDNativeLibraryEditorPlugin : public EditorPlugin { GDCLASS(GDNativeLibraryEditorPlugin, EditorPlugin); GDNativeLibraryEditor *library_editor = nullptr; - EditorNode *editor = nullptr; Button *button = nullptr; public: @@ -113,7 +112,7 @@ public: virtual bool handles(Object *p_node) const override; virtual void make_visible(bool p_visible) override; - GDNativeLibraryEditorPlugin(EditorNode *p_node); + GDNativeLibraryEditorPlugin(); }; #endif #endif // GDNATIVE_LIBRARY_EDITOR_PLUGIN_H diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp index fb682beccc..1121fd0e03 100644 --- a/modules/gdnative/register_types.cpp +++ b/modules/gdnative/register_types.cpp @@ -226,7 +226,7 @@ static void editor_init_callback() { EditorExport::get_singleton()->add_export_plugin(export_plugin); - EditorNode::get_singleton()->add_editor_plugin(memnew(GDNativeLibraryEditorPlugin(EditorNode::get_singleton()))); + EditorNode::get_singleton()->add_editor_plugin(memnew(GDNativeLibraryEditorPlugin)); } #endif |