diff options
Diffstat (limited to 'editor/editor_node.h')
-rw-r--r-- | editor/editor_node.h | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/editor/editor_node.h b/editor/editor_node.h index 0201e84eaf..c3b4c985cc 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -35,6 +35,7 @@ #include "editor/editor_folding.h" #include "editor/editor_native_shader_source_visualizer.h" #include "editor/editor_run.h" +#include "editor/editor_title_bar.h" #include "editor/export/editor_export.h" #include "editor/inspector_dock.h" @@ -72,12 +73,14 @@ class EditorRun; class EditorRunNative; class EditorSettingsDialog; class EditorToaster; +class EditorUndoRedoManager; class ExportTemplateManager; class FileDialog; class FileSystemDock; class HSplitContainer; class ImportDock; class LinkButton; +class MenuBar; class MenuButton; class NodeDock; class OrphanResourcesDialog; @@ -141,6 +144,7 @@ private: FILE_SAVE_AS_SCENE, FILE_SAVE_ALL_SCENES, FILE_SAVE_AND_RUN, + FILE_SAVE_AND_RUN_MAIN_SCENE, FILE_SHOW_IN_FILESYSTEM, FILE_EXPORT_PROJECT, FILE_EXPORT_MESH_LIBRARY, @@ -181,7 +185,6 @@ private: RUN_PROJECT_MANAGER, RUN_VCS_METADATA, RUN_VCS_SETTINGS, - RUN_VCS_SHUT_DOWN, SETTINGS_UPDATE_CONTINUOUSLY, SETTINGS_UPDATE_WHEN_CHANGED, SETTINGS_UPDATE_ALWAYS, @@ -319,26 +322,29 @@ private: HBoxContainer *bottom_hb = nullptr; Control *vp_base = nullptr; - HBoxContainer *menu_hb = nullptr; + EditorTitleBar *menu_hb = nullptr; Control *main_control = nullptr; - MenuButton *file_menu = nullptr; - MenuButton *project_menu = nullptr; - MenuButton *debug_menu = nullptr; - MenuButton *settings_menu = nullptr; - MenuButton *help_menu = nullptr; + MenuBar *main_menu = nullptr; + PopupMenu *file_menu = nullptr; + PopupMenu *project_menu = nullptr; + PopupMenu *debug_menu = nullptr; + PopupMenu *settings_menu = nullptr; + PopupMenu *help_menu = nullptr; PopupMenu *tool_menu = nullptr; PopupMenu *export_as_menu = nullptr; Button *export_button = nullptr; Button *prev_scene = nullptr; + Button *search_button = nullptr; + TextureProgressBar *audio_vu = nullptr; + + PanelContainer *launch_pad = nullptr; Button *play_button = nullptr; Button *pause_button = nullptr; Button *stop_button = nullptr; - Button *run_settings_button = nullptr; Button *play_scene_button = nullptr; Button *play_custom_scene_button = nullptr; - Button *search_button = nullptr; + PanelContainer *write_movie_panel = nullptr; Button *write_movie_button = nullptr; - TextureProgressBar *audio_vu = nullptr; Timer *screenshot_timer = nullptr; @@ -421,6 +427,7 @@ private: int dock_popup_selected_idx = -1; int dock_select_rect_over_idx = -1; + PanelContainer *tabbar_panel = nullptr; HBoxContainer *tabbar_container = nullptr; Button *distraction_free = nullptr; Button *scene_tab_add = nullptr; @@ -466,10 +473,9 @@ private: String _tmp_import_path; String external_file; String open_navigate; - String run_custom_filename; - uint64_t saved_version = 1; - uint64_t last_checked_version = 0; + String run_custom_filename; + String run_current_filename; DynamicFontImportSettings *fontdata_import_settings = nullptr; SceneImportSettings *scene_import_settings = nullptr; @@ -577,8 +583,11 @@ private: void _quick_run(); void _open_command_palette(); + void _write_movie_toggled(bool p_enabled); + void _run(bool p_current = false, const String &p_custom = ""); void _run_native(const Ref<EditorExportPreset> &p_preset); + void _reset_play_buttons(); void _add_to_recent_scenes(const String &p_scene); void _update_recent_scenes(); @@ -679,6 +688,10 @@ private: void _bottom_panel_switch(bool p_enable, int p_idx); void _bottom_panel_raise_toggled(bool); + void _begin_first_scan(); + bool use_startup_benchmark = false; + String startup_benchmark_file; + protected: friend class FileSystemDock; @@ -702,7 +715,7 @@ public: static EditorLog *get_log() { return singleton->log; } static EditorData &get_editor_data() { return singleton->editor_data; } static EditorFolding &get_editor_folding() { return singleton->editor_folding; } - static UndoRedo *get_undo_redo() { return &singleton->editor_data.get_undo_redo(); } + static Ref<EditorUndoRedoManager> &get_undo_redo(); static HBoxContainer *get_menu_hb() { return singleton->menu_hb; } static VSplitContainer *get_top_split() { return singleton->top_split; } @@ -771,6 +784,8 @@ public: void open_request(const String &p_path); void edit_foreign_resource(Ref<Resource> p_resource); + bool is_resource_read_only(Ref<Resource> p_resource); + bool is_changing_scene() const; Control *get_main_control(); @@ -786,7 +801,6 @@ public: bool is_scene_open(const String &p_path); - void set_current_version(uint64_t p_version); void set_current_scene(int p_idx); void setup_color_picker(ColorPicker *picker); @@ -813,6 +827,7 @@ public: void _copy_warning(const String &p_str); + void set_use_startup_benchmark(bool p_use_startup_benchmark, const String &p_startup_benchmark_file); Error export_preset(const String &p_preset, const String &p_path, bool p_debug, bool p_pack_only); Control *get_gui_base() { return gui_base; } |