diff options
author | Anton Yabchinskiy <arn@bestmx.ru> | 2015-11-02 20:25:01 +0300 |
---|---|---|
committer | Anton Yabchinskiy <arn@bestmx.ru> | 2015-11-02 20:25:01 +0300 |
commit | 3b9868d2e44740c03861c64020a8b5d4d6da031d (patch) | |
tree | 8ff5f9671122f946487848ce286d336c9b650c2c /tools/editor/editor_node.h | |
parent | dc8df8a91a995796f0f330bf6bb6b209f6dfce08 (diff) | |
parent | b2f9acb8c96aed0505cbac21661e21e4acef710f (diff) |
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'tools/editor/editor_node.h')
-rw-r--r-- | tools/editor/editor_node.h | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index 495f069b55..56e455c9c0 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -107,6 +107,7 @@ class EditorNode : public Node { enum MenuOptions { FILE_NEW_SCENE, + FILE_NEW_INHERITED_SCENE, FILE_OPEN_SCENE, FILE_SAVE_SCENE, FILE_SAVE_AS_SCENE, @@ -123,6 +124,7 @@ class EditorNode : public Node { FILE_OPEN_OLD_SCENE, FILE_QUICK_OPEN_SCENE, FILE_QUICK_OPEN_SCRIPT, + FILE_QUICK_OPEN_FILE, FILE_RUN_SCRIPT, FILE_OPEN_PREV, FILE_CLOSE, @@ -137,6 +139,7 @@ class EditorNode : public Node { RESOURCE_SAVE_AS, RESOURCE_UNREF, RESOURCE_COPY, + RESOURCE_PASTE, OBJECT_COPY_PARAMS, OBJECT_PASTE_PARAMS, OBJECT_UNIQUE_RESOURCES, @@ -146,12 +149,17 @@ class EditorNode : public Node { RUN_PAUSE, RUN_STOP, RUN_PLAY_SCENE, + RUN_PLAY_NATIVE, RUN_PLAY_CUSTOM_SCENE, RUN_SCENE_SETTINGS, RUN_SETTINGS, RUN_PROJECT_MANAGER, RUN_FILE_SERVER, RUN_DEPLOY_DUMB_CLIENTS, + RUN_LIVE_DEBUG, + RUN_DEBUG_COLLISONS, + RUN_DEBUG_NAVIGATION, + RUN_DEPLOY_REMOTE_DEBUG, SETTINGS_UPDATE_ALWAYS, SETTINGS_UPDATE_CHANGES, SETTINGS_IMPORT, @@ -239,8 +247,9 @@ class EditorNode : public Node { ToolButton *animation_menu; ToolButton *play_scene_button; ToolButton *play_custom_scene_button; + MenuButton *debug_button; TextureProgress *audio_vu; - MenuButton *fileserver_menu; + //MenuButton *fileserver_menu; TextEdit *load_errors; AcceptDialog *load_error_dialog; @@ -252,11 +261,13 @@ class EditorNode : public Node { Button *property_back; Button *property_forward; SceneTreeDock *scene_tree_dock; - ResourcesDock *resources_dock; + //ResourcesDock *resources_dock; PropertyEditor *property_editor; ScenesDock *scenes_dock; EditorRunNative *run_native; + CreateDialog *create_dialog; + CallDialog *call_dialog; ConfirmationDialog *confirmation; ConfirmationDialog *import_confirmation; @@ -294,6 +305,10 @@ class EditorNode : public Node { HBoxContainer *animation_panel_hb; VBoxContainer *animation_vb; EditorPath *editor_path; + ToolButton *resource_new_button; + ToolButton *resource_load_button; + MenuButton *resource_save_button; + MenuButton *editor_history_menu; AnimationKeyEditor *animation_editor; EditorLog *log; CenterContainer *tabs_center; @@ -308,6 +323,9 @@ class EditorNode : public Node { ProgressDialog *progress_dialog; BackgroundProgress *progress_hb; + DependencyErrorDialog *dependency_error; + DependencyEditor *dependency_fixer; + TabContainer *dock_slot[DOCK_SLOT_MAX]; Rect2 dock_select_rect[DOCK_SLOT_MAX]; int dock_select_rect_over; @@ -363,6 +381,7 @@ class EditorNode : public Node { int current_option; //void _animation_visibility_toggle(); + void _resource_created(); void _resource_selected(const RES& p_res,const String& p_property=""); void _menu_option(int p_option); void _menu_confirm_current(); @@ -371,6 +390,9 @@ class EditorNode : public Node { void _property_editor_forward(); void _property_editor_back(); + void _select_history(int p_idx); + void _prepare_history(); + void _fs_changed(); void _sources_changed(bool p_exist); @@ -439,6 +461,7 @@ class EditorNode : public Node { void _cleanup_scene(); void _remove_edited_scene(); + void _remove_scene(int index); bool _find_and_save_resource(RES p_res,Map<RES,bool>& processed,int32_t flags); bool _find_and_save_edited_subresources(Object *obj,Map<RES,bool>& processed,int32_t flags); void _save_edited_subresources(Node* scene,Map<RES,bool>& processed,int32_t flags); @@ -447,6 +470,16 @@ class EditorNode : public Node { void _save_scene_with_preview(String p_file); + Map<String,Set<String> > dependency_errors; + + static void _dependency_error_report(void *ud,const String& p_path,const String& p_dep,const String& p_type) { + EditorNode*en=(EditorNode*)ud; + if (!en->dependency_errors.has(p_path)) + en->dependency_errors[p_path]=Set<String>(); + en->dependency_errors[p_path].insert(p_dep+"::"+p_type); + + } + struct ExportDefer { String platform; String path; @@ -469,6 +502,7 @@ class EditorNode : public Node { void _dock_split_dragged(int ofs); void _dock_popup_exit(); void _scene_tab_changed(int p_tab); + void _scene_tab_closed(int p_tab); void _scene_tab_script_edited(int p_tab); Dictionary _get_main_scene_state(); @@ -499,6 +533,8 @@ public: void edit_node(Node *p_node); void edit_resource(const Ref<Resource>& p_resource); void open_resource(const String& p_type=""); + + void save_resource_in_path(const Ref<Resource>& p_resource,const String& p_path); void save_resource(const Ref<Resource>& p_resource); void save_resource_as(const Ref<Resource>& p_resource); @@ -530,10 +566,13 @@ public: Viewport *get_scene_root() { return scene_root; } //root of the scene being edited Error save_optimized_copy(const String& p_scene,const String& p_preset); + void fix_dependencies(const String& p_for_file); void clear_scene() { _cleanup_scene(); } - Error load_scene(const String& p_scene); + Error load_scene(const String& p_scene, bool p_ignore_broken_deps=false, bool p_set_inherited=false); Error load_resource(const String& p_scene); + bool is_scene_open(const String& p_path); + void set_current_version(uint64_t p_version); void set_current_scene(int p_idx); |