diff options
Diffstat (limited to 'editor/filesystem_dock.h')
-rw-r--r-- | editor/filesystem_dock.h | 99 |
1 files changed, 50 insertions, 49 deletions
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index 92dac374ec..df3dd3fd69 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -94,6 +94,7 @@ private: FILE_NEW_SCENE, FILE_SHOW_IN_EXPLORER, FILE_COPY_PATH, + FILE_COPY_UID, FILE_NEW_RESOURCE, FILE_NEW_TEXTFILE, FOLDER_EXPAND_ALL, @@ -102,57 +103,57 @@ private: FileSortOption file_sort = FILE_SORT_NAME; - VBoxContainer *scanning_vb; - ProgressBar *scanning_progress; - VSplitContainer *split_box; - VBoxContainer *file_list_vb; + VBoxContainer *scanning_vb = nullptr; + ProgressBar *scanning_progress = nullptr; + VSplitContainer *split_box = nullptr; + VBoxContainer *file_list_vb = nullptr; - Set<String> favorites; + RBSet<String> favorites; - Button *button_toggle_display_mode; - Button *button_reload; - Button *button_file_list_display_mode; - Button *button_hist_next; - Button *button_hist_prev; - LineEdit *current_path; + Button *button_toggle_display_mode = nullptr; + Button *button_reload = nullptr; + Button *button_file_list_display_mode = nullptr; + Button *button_hist_next = nullptr; + Button *button_hist_prev = nullptr; + LineEdit *current_path = nullptr; - HBoxContainer *toolbar2_hbc; - LineEdit *tree_search_box; - MenuButton *tree_button_sort; + HBoxContainer *toolbar2_hbc = nullptr; + LineEdit *tree_search_box = nullptr; + MenuButton *tree_button_sort = nullptr; - LineEdit *file_list_search_box; - MenuButton *file_list_button_sort; + LineEdit *file_list_search_box = nullptr; + MenuButton *file_list_button_sort = nullptr; String searched_string; Vector<String> uncollapsed_paths_before_search; - TextureRect *search_icon; - HBoxContainer *path_hb; + TextureRect *search_icon = nullptr; + HBoxContainer *path_hb = nullptr; FileListDisplayMode file_list_display_mode; DisplayMode display_mode; DisplayMode old_display_mode; - PopupMenu *file_list_popup; - PopupMenu *tree_popup; - - DependencyEditor *deps_editor; - DependencyEditorOwners *owners_editor; - DependencyRemoveDialog *remove_dialog; - - EditorDirDialog *move_dialog; - ConfirmationDialog *rename_dialog; - LineEdit *rename_dialog_text; - ConfirmationDialog *duplicate_dialog; - LineEdit *duplicate_dialog_text; - ConfirmationDialog *make_dir_dialog; - LineEdit *make_dir_dialog_text; - ConfirmationDialog *make_scene_dialog; - LineEdit *make_scene_dialog_text; - ConfirmationDialog *overwrite_dialog; - ScriptCreateDialog *make_script_dialog; - ShaderCreateDialog *make_shader_dialog; - CreateDialog *new_resource_dialog; + PopupMenu *file_list_popup = nullptr; + PopupMenu *tree_popup = nullptr; + + DependencyEditor *deps_editor = nullptr; + DependencyEditorOwners *owners_editor = nullptr; + DependencyRemoveDialog *remove_dialog = nullptr; + + EditorDirDialog *move_dialog = nullptr; + ConfirmationDialog *rename_dialog = nullptr; + LineEdit *rename_dialog_text = nullptr; + ConfirmationDialog *duplicate_dialog = nullptr; + LineEdit *duplicate_dialog_text = nullptr; + ConfirmationDialog *make_dir_dialog = nullptr; + LineEdit *make_dir_dialog_text = nullptr; + ConfirmationDialog *make_scene_dialog = nullptr; + LineEdit *make_scene_dialog_text = nullptr; + ConfirmationDialog *overwrite_dialog = nullptr; + ScriptCreateDialog *make_script_dialog = nullptr; + ShaderCreateDialog *make_shader_dialog = nullptr; + CreateDialog *new_resource_dialog = nullptr; bool always_show_folders = false; @@ -181,8 +182,8 @@ private: bool updating_tree = false; int tree_update_id; - Tree *tree; - ItemList *files; + Tree *tree = nullptr; + ItemList *files = nullptr; bool import_dock_needs_update = false; bool holding_branch = false; @@ -216,14 +217,14 @@ private: void _update_import_dock(); void _get_all_items_in_dir(EditorFileSystemDirectory *efsd, Vector<String> &files, Vector<String> &folders) const; - void _find_remaps(EditorFileSystemDirectory *efsd, const Map<String, String> &renames, Vector<String> &to_remaps) const; - void _try_move_item(const FileOrFolder &p_item, const String &p_new_path, Map<String, String> &p_file_renames, Map<String, String> &p_folder_renames); + void _find_remaps(EditorFileSystemDirectory *efsd, const HashMap<String, String> &renames, Vector<String> &to_remaps) const; + void _try_move_item(const FileOrFolder &p_item, const String &p_new_path, HashMap<String, String> &p_file_renames, HashMap<String, String> &p_folder_renames); void _try_duplicate_item(const FileOrFolder &p_item, const String &p_new_path) const; - void _update_dependencies_after_move(const Map<String, String> &p_renames) const; - void _update_resource_paths_after_move(const Map<String, String> &p_renames) const; - void _save_scenes_after_move(const Map<String, String> &p_renames) const; - void _update_favorites_list_after_move(const Map<String, String> &p_files_renames, const Map<String, String> &p_folders_renames) const; - void _update_project_settings_after_move(const Map<String, String> &p_renames) const; + void _update_dependencies_after_move(const HashMap<String, String> &p_renames) const; + void _update_resource_paths_after_move(const HashMap<String, String> &p_renames) const; + void _save_scenes_after_move(const HashMap<String, String> &p_renames) const; + void _update_favorites_list_after_move(const HashMap<String, String> &p_files_renames, const HashMap<String, String> &p_folders_renames) const; + void _update_project_settings_after_move(const HashMap<String, String> &p_renames) const; void _file_removed(String p_file); void _folder_removed(String p_folder); @@ -259,8 +260,8 @@ private: void _file_and_folders_fill_popup(PopupMenu *p_popup, Vector<String> p_paths, bool p_display_path_dependent_options = true); void _tree_rmb_select(const Vector2 &p_pos); void _tree_rmb_empty(const Vector2 &p_pos); - void _file_list_rmb_select(int p_item, const Vector2 &p_pos); - void _file_list_rmb_pressed(const Vector2 &p_pos); + void _file_list_item_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index); + void _file_list_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index); void _tree_empty_selected(); struct FileInfo { |