diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-18 12:24:17 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-18 12:24:17 +0200 |
commit | 043ca7c63c31b0f271a13998151cb03f0ff826ba (patch) | |
tree | ebebc5f2bf73d8aeaf5a059a378539927110820c /scene/gui/file_dialog.h | |
parent | 3a88373a4c3e024aa96f94d08dd5f979e9af0f1c (diff) | |
parent | e95e954c68a9a694ad43f622e5424d9e3ec87819 (diff) | |
download | redot-engine-043ca7c63c31b0f271a13998151cb03f0ff826ba.tar.gz |
Merge pull request #88306 from KoBeWi/PropertyListHelper_will_come_for_you
Add PropertyListHelper in all simple cases
Diffstat (limited to 'scene/gui/file_dialog.h')
-rw-r--r-- | scene/gui/file_dialog.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h index 7caae7e216..4236f0a56b 100644 --- a/scene/gui/file_dialog.h +++ b/scene/gui/file_dialog.h @@ -37,6 +37,7 @@ #include "scene/gui/line_edit.h" #include "scene/gui/option_button.h" #include "scene/gui/tree.h" +#include "scene/property_list_helper.h" class GridContainer; @@ -137,6 +138,10 @@ private: Vector<String> values; int default_idx = 0; }; + + static inline PropertyListHelper base_property_helper; + PropertyListHelper property_helper; + Vector<Option> options; Dictionary selected_options; bool options_dirty = false; @@ -187,9 +192,11 @@ private: protected: void _validate_property(PropertyInfo &p_property) const; void _notification(int p_what); - bool _set(const StringName &p_name, const Variant &p_value); - bool _get(const StringName &p_name, Variant &r_ret) const; - void _get_property_list(List<PropertyInfo> *p_list) const; + bool _set(const StringName &p_name, const Variant &p_value) { return property_helper.property_set_value(p_name, p_value); } + bool _get(const StringName &p_name, Variant &r_ret) const { return property_helper.property_get_value(p_name, r_ret); } + void _get_property_list(List<PropertyInfo> *p_list) const { property_helper.get_property_list(p_list, options.size()); } + bool _property_can_revert(const StringName &p_name) const { return property_helper.property_can_revert(p_name); } + bool _property_get_revert(const StringName &p_name, Variant &r_property) const { return property_helper.property_get_revert(p_name, r_property); } static void _bind_methods(); public: |