mirror of
https://github.com/tiennm99/godot.git
synced 2026-07-06 07:07:49 +00:00
Shortcut: Rename shortcut property to event
Having a property which has the same name as its class leads to confusing situations (e.g. `BaseButton` has a `shortcut` property of type `Shortcut` which has a `shortcut` property of type `InputEvent`). Also renames `is_event` to `matches_event`, and `is_valid` to `has_valid_event` to better reflect what the methods check.
This commit is contained in:
@@ -2454,7 +2454,7 @@ static bool is_shortcut_pressed(const String &p_path) {
|
||||
if (shortcut.is_null()) {
|
||||
return false;
|
||||
}
|
||||
InputEventKey *k = Object::cast_to<InputEventKey>(shortcut->get_shortcut().ptr());
|
||||
InputEventKey *k = Object::cast_to<InputEventKey>(shortcut->get_event().ptr());
|
||||
if (k == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user