| 118 | } |
| 119 | |
| 120 | bool Shortcut::is_event_array_equal(const Array &p_event_array1, const Array &p_event_array2) { |
| 121 | if (p_event_array1.size() != p_event_array2.size()) { |
| 122 | return false; |
| 123 | } |
| 124 | |
| 125 | bool is_same = true; |
| 126 | for (int i = 0; i < p_event_array1.size(); i++) { |
| 127 | Ref<InputEvent> ie_1 = p_event_array1[i]; |
| 128 | Ref<InputEvent> ie_2 = p_event_array2[i]; |
| 129 | |
| 130 | is_same = ie_1->is_match(ie_2); |
| 131 | |
| 132 | // Break on the first that doesn't match - don't need to check further. |
| 133 | if (!is_same) { |
| 134 | break; |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | return is_same; |
| 139 | } |
no test coverage detected