You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-29 16:16:38 +00:00
Add EditorContextMenuPluginManager and refactor menu plugins
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#define EDITOR_PLUGIN_H
|
||||
|
||||
#include "core/io/config_file.h"
|
||||
#include "editor/plugins/editor_context_menu_plugin.h"
|
||||
#include "scene/3d/camera_3d.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
@@ -53,7 +54,6 @@ class EditorToolAddons;
|
||||
class EditorTranslationParserPlugin;
|
||||
class EditorUndoRedoManager;
|
||||
class ScriptCreateDialog;
|
||||
class EditorContextMenuPlugin;
|
||||
|
||||
class EditorPlugin : public Node {
|
||||
GDCLASS(EditorPlugin, Node);
|
||||
@@ -103,13 +103,6 @@ public:
|
||||
AFTER_GUI_INPUT_CUSTOM,
|
||||
};
|
||||
|
||||
enum ContextMenuSlot {
|
||||
CONTEXT_SLOT_SCENE_TREE,
|
||||
CONTEXT_SLOT_FILESYSTEM,
|
||||
CONTEXT_SLOT_SCRIPT_EDITOR,
|
||||
CONTEXT_SUBMENU_SLOT_FILESYSTEM_CREATE,
|
||||
};
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
|
||||
@@ -257,8 +250,8 @@ public:
|
||||
void add_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
|
||||
void remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
|
||||
|
||||
void add_context_menu_plugin(ContextMenuSlot p_slot, const Ref<EditorContextMenuPlugin> &p_plugin);
|
||||
void remove_context_menu_plugin(ContextMenuSlot p_slot, const Ref<EditorContextMenuPlugin> &p_plugin);
|
||||
void add_context_menu_plugin(EditorContextMenuPlugin::ContextMenuSlot p_slot, const Ref<EditorContextMenuPlugin> &p_plugin);
|
||||
void remove_context_menu_plugin(const Ref<EditorContextMenuPlugin> &p_plugin);
|
||||
|
||||
void enable_plugin();
|
||||
void disable_plugin();
|
||||
@@ -270,7 +263,6 @@ public:
|
||||
VARIANT_ENUM_CAST(EditorPlugin::CustomControlContainer);
|
||||
VARIANT_ENUM_CAST(EditorPlugin::DockSlot);
|
||||
VARIANT_ENUM_CAST(EditorPlugin::AfterGUIInput);
|
||||
VARIANT_ENUM_CAST(EditorPlugin::ContextMenuSlot);
|
||||
|
||||
typedef EditorPlugin *(*EditorPluginCreateFunc)();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user