Godot Engine – Multi-platform 2D and 3D game engine
Exclude InputEventShortcut from Shortcut events type hint
JohnLee0e0832f94f32
diff --git a/core/input/shortcut.cpp b/core/input/shortcut.cppindex 36a4e876748..2f7b06ce38e 100644--- a/core/input/shortcut.cpp+++ b/core/input/shortcut.cpp@@ -119,7 +119,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, MAKE_RESOURCE_TYPE_HINT("InputEvent")), "set_events", "get_events");+ ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "events", PROPERTY_HINT_ARRAY_TYPE, MAKE_RESOURCE_TYPE_HINT("InputEvent,-InputEventShortcut")), "set_events", "get_events");}bool Shortcut::is_event_array_equal(const Array &p_event_array1, const Array &p_event_array2) {diff --git a/misc/extension_api_validation/4.7-stable/GH-125031.txt b/misc/extension_api_validation/4.7-stable/GH-125031.txtnew file mode 100644index 00000000000..3983f7343b1--- /dev/null+++ b/misc/extension_api_validation/4.7-stable/GH-125031.txt@@ -0,0 +1,3 @@+Validate extension JSON: Error: Field 'classes/Shortcut/properties/events': type changed value in new API, from "typedarray::24/17:InputEvent" to "typedarray::24/17:InputEvent,-InputEventShortcut".++Removed InputEventShortcut from the Shortcut.events dropdown. Only the editor is affected, so no adjustments should be necessary.