1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Allow shortcuts to have any number of bindings. Updated UI as required.

This commit is contained in:
Eric M
2021-06-21 11:34:50 +10:00
parent 4baddc1126
commit ad30b0a8dd
9 changed files with 483 additions and 278 deletions

View File

@@ -2483,8 +2483,14 @@ static bool is_shortcut_pressed(const String &p_path) {
if (shortcut.is_null()) {
return false;
}
InputEventKey *k = Object::cast_to<InputEventKey>(shortcut->get_event().ptr());
if (k == nullptr) {
const Array shortcuts = shortcut->get_events();
Ref<InputEventKey> k;
if (shortcuts.size() > 0) {
k = shortcuts.front();
}
if (k.is_null()) {
return false;
}
const Input &input = *Input::get_singleton();