| 1022 | } |
| 1023 | |
| 1024 | bool InputEventMouseMotion::accumulate(const Ref<InputEvent> &p_event) { |
| 1025 | Ref<InputEventMouseMotion> motion = p_event; |
| 1026 | if (motion.is_null()) { |
| 1027 | return false; |
| 1028 | } |
| 1029 | |
| 1030 | if (get_window_id() != motion->get_window_id()) { |
| 1031 | return false; |
| 1032 | } |
| 1033 | |
| 1034 | if (is_canceled() != motion->is_canceled()) { |
| 1035 | return false; |
| 1036 | } |
| 1037 | |
| 1038 | if (is_pressed() != motion->is_pressed()) { |
| 1039 | return false; |
| 1040 | } |
| 1041 | |
| 1042 | if (get_button_mask() != motion->get_button_mask()) { |
| 1043 | return false; |
| 1044 | } |
| 1045 | |
| 1046 | if (is_shift_pressed() != motion->is_shift_pressed()) { |
| 1047 | return false; |
| 1048 | } |
| 1049 | |
| 1050 | if (is_ctrl_pressed() != motion->is_ctrl_pressed()) { |
| 1051 | return false; |
| 1052 | } |
| 1053 | |
| 1054 | if (is_alt_pressed() != motion->is_alt_pressed()) { |
| 1055 | return false; |
| 1056 | } |
| 1057 | |
| 1058 | if (is_meta_pressed() != motion->is_meta_pressed()) { |
| 1059 | return false; |
| 1060 | } |
| 1061 | |
| 1062 | set_position(motion->get_position()); |
| 1063 | set_global_position(motion->get_global_position()); |
| 1064 | set_velocity(motion->get_velocity()); |
| 1065 | set_screen_velocity(motion->get_screen_velocity()); |
| 1066 | relative += motion->get_relative(); |
| 1067 | screen_relative += motion->get_relative_screen_position(); |
| 1068 | |
| 1069 | return true; |
| 1070 | } |
| 1071 | |
| 1072 | void InputEventMouseMotion::_bind_methods() { |
| 1073 | ClassDB::bind_method(D_METHOD("set_tilt", "tilt"), &InputEventMouseMotion::set_tilt); |
no test coverage detected