diff options
Diffstat (limited to 'editor/editor_node.h')
-rw-r--r-- | editor/editor_node.h | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/editor/editor_node.h b/editor/editor_node.h index 7e16936f5d..51d01d07ef 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -32,6 +32,7 @@ #define EDITOR_NODE_H #include "core/templates/safe_refcount.h" +#include "editor/editor_command_palette.h" #include "editor/editor_data.h" #include "editor/editor_export.h" #include "editor/editor_folding.h" @@ -40,6 +41,7 @@ #include "editor/inspector_dock.h" #include "editor/property_editor.h" #include "editor/scene_tree_dock.h" +#include "scene/gui/link_button.h" typedef void (*EditorNodeInitCallback)(); typedef void (*EditorPluginInitializeCallback)(); @@ -54,6 +56,7 @@ class Control; class DependencyEditor; class DependencyErrorDialog; class EditorAbout; +class EditorCommandPalette; class EditorExport; class EditorFeatureProfileManager; class EditorFileServer; @@ -89,6 +92,8 @@ class VSplitContainer; class Window; class SubViewport; class SceneImportSettings; +class EditorExtensionManager; +class DynamicFontImportSettings; class EditorNode : public Node { GDCLASS(EditorNode, Node); @@ -134,7 +139,6 @@ private: FILE_EXPORT_MESH_LIBRARY, FILE_INSTALL_ANDROID_SOURCE, FILE_EXPLORE_ANDROID_BUILD_TEMPLATES, - FILE_EXPORT_TILESET, FILE_SAVE_OPTIMIZED, FILE_OPEN_RECENT, FILE_OPEN_OLD_SCENE, @@ -164,6 +168,7 @@ private: RUN_PLAY_CUSTOM_SCENE, RUN_SETTINGS, RUN_PROJECT_DATA_FOLDER, + RUN_RELOAD_CURRENT_PROJECT, RUN_PROJECT_MANAGER, RUN_VCS_SETTINGS, RUN_VCS_SHUT_DOWN, @@ -180,6 +185,7 @@ private: SETTINGS_EDITOR_CONFIG_FOLDER, SETTINGS_MANAGE_EXPORT_TEMPLATES, SETTINGS_MANAGE_FEATURE_PROFILES, + SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE, SETTINGS_PICK_MAIN_SCENE, SETTINGS_TOGGLE_CONSOLE, SETTINGS_TOGGLE_FULLSCREEN, @@ -190,12 +196,15 @@ private: EDITOR_OPEN_SCREENSHOT, HELP_SEARCH, + HELP_COMMAND_PALETTE, HELP_DOCS, HELP_QA, HELP_REPORT_A_BUG, + HELP_SUGGEST_A_FEATURE, HELP_SEND_DOCS_FEEDBACK, HELP_COMMUNITY, HELP_ABOUT, + HELP_SUPPORT_GODOT_DEVELOPMENT, SET_VIDEO_DRIVER_SAVE_AND_RESTART, @@ -298,6 +307,7 @@ private: ConfirmationDialog *save_confirmation; ConfirmationDialog *import_confirmation; ConfirmationDialog *pick_main_scene; + Button *select_current_scene_button; AcceptDialog *accept; EditorAbout *about; AcceptDialog *warning; @@ -323,6 +333,7 @@ private: EditorFileDialog *file_templates; EditorFileDialog *file_export_lib; EditorFileDialog *file_script; + EditorFileDialog *file_android_build_source; CheckBox *file_export_lib_merge; String current_path; MenuButton *update_spinner; @@ -330,12 +341,13 @@ private: EditorNativeShaderSourceVisualizer *native_shader_source_visualizer; String defer_load_scene; - Node *_last_instanced_scene; + Node *_last_instantiated_scene; EditorLog *log; CenterContainer *tabs_center; EditorQuickOpen *quick_open; EditorQuickOpen *quick_run; + EditorCommandPalette *command_palette; HBoxContainer *main_editor_button_vb; Vector<Button *> main_editor_buttons; @@ -411,6 +423,7 @@ private: EditorResourcePreview *resource_preview; EditorFolding editor_folding; + DynamicFontImportSettings *fontdata_import_settings; SceneImportSettings *scene_import_settings; struct BottomPanelItem { String name; @@ -424,7 +437,7 @@ private: HBoxContainer *bottom_panel_hb; HBoxContainer *bottom_panel_hb_editors; VBoxContainer *bottom_panel_vb; - Label *version_label; + LinkButton *version_btn; Button *bottom_panel_raise; Tree *disk_changed_list; @@ -451,6 +464,8 @@ private: void _menu_confirm_current(); void _menu_option_confirm(int p_option, bool p_confirmed); + void _android_build_source_selected(const String &p_file); + void _request_screenshot(); void _screenshot(bool p_use_utc = false); void _save_screenshot(NodePath p_path); @@ -460,6 +475,7 @@ private: void _update_file_menu_closed(); void _on_plugin_ready(Object *p_script, const String &p_activate_name); + void _remove_plugin_from_enabled(const String &p_name); void _fs_changed(); void _resources_reimported(const Vector<String> &p_resources); @@ -477,6 +493,7 @@ private: void _close_messages(); void _show_messages(); void _vp_resized(); + void _version_button_pressed(); int _save_external_resources(); @@ -487,7 +504,7 @@ private: void _discard_changes(const String &p_str = String()); void _inherit_request(String p_file); - void _instance_request(const Vector<String> &p_files); + void _instantiate_request(const Vector<String> &p_files); void _display_top_editors(bool p_display); void _set_top_editors(Vector<EditorPlugin *> p_editor_plugins_over); @@ -495,6 +512,7 @@ private: void _quick_opened(); void _quick_run(); + void _open_command_palette(); void _run(bool p_current = false, const String &p_custom = ""); void _run_native(const Ref<EditorExportPreset> &p_preset); @@ -515,7 +533,7 @@ private: bool convert_old; - void _unhandled_input(const Ref<InputEvent> &p_event); + virtual void unhandled_input(const Ref<InputEvent> &p_event) override; static void _load_error_notify(void *p_ud, const String &p_text); @@ -658,6 +676,11 @@ private: bool _is_class_editor_disabled_by_feature_profile(const StringName &p_class); Ref<ImageTexture> _load_custom_class_icon(const String &p_path) const; + void _pick_main_scene_custom_action(const String &p_custom_action_name); + + bool immediate_dialog_confirmed = false; + void _immediate_dialog_confirmed(); + protected: void _notification(int p_what); @@ -766,7 +789,7 @@ public: static VSplitContainer *get_top_split() { return singleton->top_split; } void request_instance_scene(const String &p_path); - void request_instance_scenes(const Vector<String> &p_files); + void request_instantiate_scenes(const Vector<String> &p_files); FileSystemDock *get_filesystem_dock(); ImportDock *get_import_dock(); SceneTreeDock *get_scene_tree_dock(); @@ -852,7 +875,7 @@ public: void notify_settings_changed(); - void dim_editor(bool p_dimming, bool p_force_dim = false); + void dim_editor(bool p_dimming); bool is_editor_dimmed() const; void edit_current() { _edit_current(); }; @@ -881,6 +904,8 @@ public: void run_stop(); bool is_run_playing() const; String get_run_playing_scene() const; + + static bool immediate_confirmation_dialog(const String &p_text, const String &p_ok_text = TTR("Ok"), const String &p_cancel_text = TTR("Cancel")); }; struct EditorProgress { |