diff options
Diffstat (limited to 'editor/editor_plugin.h')
-rw-r--r-- | editor/editor_plugin.h | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index 2792c8bf19..ae9fcfb28a 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -32,12 +32,13 @@ #define EDITOR_PLUGIN_H #include "core/io/config_file.h" -#include "core/undo_redo.h" +#include "core/object/undo_redo.h" +#include "editor/debugger/editor_debugger_node.h" #include "editor/editor_inspector.h" +#include "editor/editor_translation_parser.h" #include "editor/import/editor_import_plugin.h" #include "editor/import/resource_importer_scene.h" #include "editor/script_create_dialog.h" -#include "scene/gui/tool_button.h" #include "scene/main/node.h" #include "scene/resources/texture.h" @@ -68,11 +69,18 @@ protected: public: static EditorInterface *get_singleton() { return singleton; } - Control *get_editor_viewport(); + Control *get_editor_main_control(); void edit_resource(const Ref<Resource> &p_resource); void open_scene_from_path(const String &scene_path); void reload_scene_from_path(const String &scene_path); + void play_main_scene(); + void play_current_scene(); + void play_custom_scene(const String &scene_path); + void stop_playing_scene(); + bool is_playing_scene() const; + String get_playing_scene() const; + Node *get_edited_scene_root(); Array get_open_scenes() const; ScriptEditor *get_script_editor(); @@ -81,7 +89,7 @@ public: String get_selected_path() const; String get_current_path() const; - void inspect_object(Object *p_obj, const String &p_for_property = String()); + void inspect_object(Object *p_obj, const String &p_for_property = String(), bool p_inspector_only = false); EditorSelection *get_selection(); //EditorImportExport *get_import_export(); @@ -105,6 +113,7 @@ public: void set_main_screen_editor(const String &p_name); void set_distraction_free_mode(bool p_enter); + bool is_distraction_free_mode_enabled() const; EditorInterface(); }; @@ -121,7 +130,11 @@ class EditorPlugin : public Node { String last_main_screen_name; + void _editor_project_settings_changed(); + protected: + void _notification(int p_what); + static void _bind_methods(); UndoRedo &get_undo_redo() { return *undo_redo; } @@ -160,12 +173,12 @@ public: void add_control_to_container(CustomControlContainer p_location, Control *p_control); void remove_control_from_container(CustomControlContainer p_location, Control *p_control); - ToolButton *add_control_to_bottom_panel(Control *p_control, const String &p_title); + Button *add_control_to_bottom_panel(Control *p_control, const String &p_title); void add_control_to_dock(DockSlot p_slot, Control *p_control); void remove_control_from_docks(Control *p_control); void remove_control_from_bottom_panel(Control *p_control); - void add_tool_menu_item(const String &p_name, Object *p_handler, const String &p_callback, const Variant &p_ud = Variant()); + void add_tool_menu_item(const String &p_name, const Callable &p_callable); void add_tool_submenu_item(const String &p_name, Object *p_submenu); void remove_tool_menu_item(const String &p_name); @@ -212,7 +225,7 @@ public: int update_overlays() const; - void queue_save_layout() const; + void queue_save_layout(); void make_bottom_panel_item_visible(Control *p_item); void hide_bottom_panel(); @@ -220,6 +233,9 @@ public: virtual void restore_global_state(); virtual void save_global_state(); + void add_translation_parser_plugin(const Ref<EditorTranslationParserPlugin> &p_parser); + void remove_translation_parser_plugin(const Ref<EditorTranslationParserPlugin> &p_parser); + void add_import_plugin(const Ref<EditorImportPlugin> &p_importer); void remove_import_plugin(const Ref<EditorImportPlugin> &p_importer); @@ -238,6 +254,9 @@ public: void add_autoload_singleton(const String &p_name, const String &p_path); void remove_autoload_singleton(const String &p_name); + void add_debugger_plugin(const Ref<Script> &p_script); + void remove_debugger_plugin(const Ref<Script> &p_script); + void enable_plugin(); void disable_plugin(); |