diff options
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/config_file.cpp | 5 | ||||
-rw-r--r-- | core/io/config_file.h | 2 | ||||
-rw-r--r-- | core/io/resource_importer.h | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp index 015c1f0d90..10f68f3cef 100644 --- a/core/io/config_file.cpp +++ b/core/io/config_file.cpp @@ -295,6 +295,9 @@ Error ConfigFile::_parse(const String &p_path, VariantParser::Stream *p_stream) return OK; } +void ConfigFile::clear() { + values.clear(); +} void ConfigFile::_bind_methods() { ClassDB::bind_method(D_METHOD("set_value", "section", "key", "value"), &ConfigFile::set_value); ClassDB::bind_method(D_METHOD("get_value", "section", "key", "default"), &ConfigFile::get_value, DEFVAL(Variant())); @@ -317,4 +320,6 @@ void ConfigFile::_bind_methods() { ClassDB::bind_method(D_METHOD("save_encrypted", "path", "key"), &ConfigFile::save_encrypted); ClassDB::bind_method(D_METHOD("save_encrypted_pass", "path", "password"), &ConfigFile::save_encrypted_pass); + + ClassDB::bind_method(D_METHOD("clear"), &ConfigFile::clear); } diff --git a/core/io/config_file.h b/core/io/config_file.h index 386d304f07..1b28257c60 100644 --- a/core/io/config_file.h +++ b/core/io/config_file.h @@ -68,6 +68,8 @@ public: Error load(const String &p_path); Error parse(const String &p_data); + void clear(); + Error load_encrypted(const String &p_path, const Vector<uint8_t> &p_key); Error load_encrypted_pass(const String &p_path, const String &p_pass); diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h index 91efec5534..eeb486073e 100644 --- a/core/io/resource_importer.h +++ b/core/io/resource_importer.h @@ -115,6 +115,9 @@ public: ImportOption() {} }; + virtual bool has_advanced_options() const { return false; } + virtual void show_advanced_options(const String &p_path) {} + virtual int get_preset_count() const { return 0; } virtual String get_preset_name(int p_idx) const { return String(); } |