diff options
Diffstat (limited to 'tools/editor/editor_node.h')
-rw-r--r-- | tools/editor/editor_node.h | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index ce04816fe1..976c55a924 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -76,6 +76,7 @@ #include "editor_reimport_dialog.h" #include "import_settings.h" #include "tools/editor/editor_plugin.h" +#include "tools/editor/editor_name_dialog.h" #include "fileserver/editor_file_server.h" #include "editor_resource_preview.h" @@ -131,6 +132,7 @@ class EditorNode : public Node { EDIT_UNDO, EDIT_REDO, EDIT_REVERT, + TOOLS_ORPHAN_RESOURCES, RESOURCE_NEW, RESOURCE_LOAD, RESOURCE_SAVE, @@ -164,6 +166,9 @@ class EditorNode : public Node { SETTINGS_EXPORT_PREFERENCES, SETTINGS_PREFERENCES, SETTINGS_OPTIMIZED_PRESETS, + SETTINGS_LAYOUT_SAVE, + SETTINGS_LAYOUT_DELETE, + SETTINGS_LAYOUT_DEFAULT, SETTINGS_SHOW_ANIMATION, SETTINGS_LOAD_EXPORT_TEMPLATES, SETTINGS_HELP, @@ -235,6 +240,7 @@ class EditorNode : public Node { Control *viewport; MenuButton *file_menu; MenuButton *import_menu; + MenuButton *tool_menu; ToolButton *export_button; ToolButton *prev_scene; MenuButton *object_menu; @@ -280,6 +286,11 @@ class EditorNode : public Node { AcceptDialog *about; AcceptDialog *warning; + int overridden_default_layout; + Ref<ConfigFile> default_layout; + PopupMenu *editor_layouts; + EditorNameDialog *layout_dialog; + //OptimizedPresetsDialog *optimized_presets; EditorSettingsDialog *settings_config_dialog; RunSettingsDialog *run_settings_dialog; @@ -331,6 +342,7 @@ class EditorNode : public Node { DependencyErrorDialog *dependency_error; DependencyEditor *dependency_fixer; + OrphanResourcesDialog *orphan_resources; TabContainer *dock_slot[DOCK_SLOT_MAX]; Rect2 dock_select_rect[DOCK_SLOT_MAX]; @@ -406,8 +418,8 @@ class EditorNode : public Node { void _node_renamed(); void _editor_select(int p_which); - void _set_scene_metadata(); - void _get_scene_metadata(); + void _set_scene_metadata(const String &p_file); + void _get_scene_metadata(const String& p_file); void _update_title(); void _update_scene_tabs(); void _close_messages(); @@ -426,7 +438,7 @@ class EditorNode : public Node { void _update_keying(); void _hide_top_editors(); - void _quick_opened(const String& p_resource); + void _quick_opened(); void _quick_run(const String& p_resource); void _run(bool p_current=false, const String &p_custom=""); @@ -518,13 +530,19 @@ class EditorNode : public Node { void _save_docks(); void _load_docks(); + void _save_docks_to_config(Ref<ConfigFile> p_layout, const String& p_section); + void _load_docks_from_config(Ref<ConfigFile> p_layout, const String& p_section); + + void _update_layouts_menu(); + void _layout_menu_option(int p_idx); void _toggle_search_bar(bool p_pressed); void _clear_search_box(); + void _clear_undo_history(); protected: void _notification(int p_what); - static void _bind_methods(); + static void _bind_methods(); public: enum EditorTable { @@ -627,7 +645,7 @@ public: static void add_io_error(const String& p_error); static void progress_add_task(const String& p_task,const String& p_label, int p_steps); - static void progress_task_step(const String& p_task,const String& p_state, int p_step=-1); + static void progress_task_step(const String& p_task,const String& p_state, int p_step=-1,bool p_force_refresh=true); static void progress_end_task(const String& p_task); static void progress_add_task_bg(const String& p_task,const String& p_label, int p_steps); @@ -654,7 +672,7 @@ public: struct EditorProgress { String task; - void step(const String& p_state, int p_step=-1) { EditorNode::progress_task_step(task,p_state,p_step); } + void step(const String& p_state, int p_step=-1,bool p_force_refresh=true) { EditorNode::progress_task_step(task,p_state,p_step,p_force_refresh); } EditorProgress(const String& p_task,const String& p_label,int p_amount) { EditorNode::progress_add_task(p_task,p_label,p_amount); task=p_task; } ~EditorProgress() { EditorNode::progress_end_task(task); } }; |