Add support for _notification, _set, _get, _get_property_list, _property_can_revert, _property_get_revert, and _to_string methods.

This commit is contained in:
bruvzg
2022-08-19 10:30:06 +03:00
parent f454253005
commit 270ad28931
11 changed files with 447 additions and 119 deletions

View File

@@ -56,14 +56,31 @@ public:
~ExampleRef();
};
class ExampleMin : public Control {
GDCLASS(ExampleMin, Control);
protected:
static void _bind_methods(){};
};
class Example : public Control {
GDCLASS(Example, Control);
protected:
static void _bind_methods();
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 _property_can_revert(const StringName &p_name) const;
bool _property_get_revert(const StringName &p_name, Variant &r_property) const;
String _to_string() const;
private:
Vector2 custom_position;
Vector3 property_from_list;
public:
// Constants.