diff options
Diffstat (limited to 'editor/import_dock.h')
-rw-r--r-- | editor/import_dock.h | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/editor/import_dock.h b/editor/import_dock.h index 2be48dd505..3098c6e815 100644 --- a/editor/import_dock.h +++ b/editor/import_dock.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef IMPORTDOCK_H -#define IMPORTDOCK_H +#ifndef IMPORT_DOCK_H +#define IMPORT_DOCK_H #include "core/io/config_file.h" #include "core/io/resource_importer.h" @@ -45,29 +45,35 @@ class ImportDockParameters; class ImportDock : public VBoxContainer { GDCLASS(ImportDock, VBoxContainer); - Label *imported; - OptionButton *import_as; - MenuButton *preset; - EditorInspector *import_opts; + Label *imported = nullptr; + OptionButton *import_as = nullptr; + MenuButton *preset = nullptr; + EditorInspector *import_opts = nullptr; List<PropertyInfo> properties; - Map<StringName, Variant> property_values; + HashMap<StringName, Variant> property_values; - ConfirmationDialog *reimport_confirm; - Label *label_warning; - Button *import; + ConfirmationDialog *reimport_confirm = nullptr; + Label *label_warning = nullptr; + Button *import = nullptr; - Control *advanced_spacer; - Button *advanced; + Control *advanced_spacer = nullptr; + Button *advanced = nullptr; - ImportDockParameters *params; + ImportDockParameters *params = nullptr; + + VBoxContainer *content = nullptr; + Label *select_a_resource = nullptr; void _preset_selected(int p_idx); void _importer_selected(int i_idx); - void _update_options(const Ref<ConfigFile> &p_config = Ref<ConfigFile>()); + void _update_options(const String &p_path, const Ref<ConfigFile> &p_config = Ref<ConfigFile>()); void _update_preset_menu(); + void _add_keep_import_option(const String &p_importer_name); + void _property_edited(const StringName &p_prop); void _property_toggled(const StringName &p_prop, bool p_checked); + void _set_dirty(bool p_dirty); void _reimport_attempt(); void _reimport_and_restart(); void _reimport(); @@ -79,6 +85,12 @@ class ImportDock : public VBoxContainer { ITEM_CLEAR_DEFAULT, }; +private: + static ImportDock *singleton; + +public: + static ImportDock *get_singleton() { return singleton; } + protected: static void _bind_methods(); void _notification(int p_what); @@ -93,4 +105,4 @@ public: ~ImportDock(); }; -#endif // IMPORTDOCK_H +#endif // IMPORT_DOCK_H |