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:
Rémi Verschelde
2021-08-03 17:27:45 +02:00
parent 1eff610e2b
commit de2c2be19b
11 changed files with 69 additions and 74 deletions
+1 -1
View File
@@ -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;
}