diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-22 16:10:41 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-24 14:06:00 +0100 |
commit | 5d20dccade7dee6fa2de8147f407818cdfaa0955 (patch) | |
tree | dbde6d289bc04018b42904a53da4878c9f0fd572 /core/input/shortcut.cpp | |
parent | f6f8a48459f9bbe97ee76a7186b9ae37e71e724b (diff) |
Add MAKE_RESOURCE_TYPE_HINT macro to simplify binding arrays of resources
Diffstat (limited to 'core/input/shortcut.cpp')
-rw-r--r-- | core/input/shortcut.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/input/shortcut.cpp b/core/input/shortcut.cpp index 9eeeb449ba..e74ccb11bb 100644 --- a/core/input/shortcut.cpp +++ b/core/input/shortcut.cpp @@ -107,7 +107,7 @@ void Shortcut::_bind_methods() { ClassDB::bind_method(D_METHOD("matches_event", "event"), &Shortcut::matches_event); ClassDB::bind_method(D_METHOD("get_as_text"), &Shortcut::get_as_text); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "events", PROPERTY_HINT_ARRAY_TYPE, vformat("%s/%s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")), "set_events", "get_events"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "events", PROPERTY_HINT_ARRAY_TYPE, MAKE_RESOURCE_TYPE_HINT("InputEvent")), "set_events", "get_events"); } bool Shortcut::is_event_array_equal(const Array &p_event_array1, const Array &p_event_array2) { |