You've already forked godot
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user