summaryrefslogtreecommitdiffstats
path: root/test/src/example.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/example.cpp')
-rw-r--r--test/src/example.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp
index 8a761a4..dc471dd 100644
--- a/test/src/example.cpp
+++ b/test/src/example.cpp
@@ -117,6 +117,14 @@ bool Example::_property_get_revert(const StringName &p_name, Variant &r_property
}
};
+void Example::_validate_property(PropertyInfo &p_property) const {
+ String name = p_property.name;
+ // Test hiding the "mouse_filter" property from the editor.
+ if (name == "mouse_filter") {
+ p_property.usage = PROPERTY_USAGE_NO_EDITOR;
+ }
+}
+
void Example::_bind_methods() {
// Methods.
ClassDB::bind_method(D_METHOD("simple_func"), &Example::simple_func);