滑动 / Swipe Args: x1: 起点 x 坐标 / Start x coordinate y1: 起点 y 坐标 / Start y coordinate x2: 终点 x 坐标 / End x coordinate y2: 终点 y 坐标 / End y coordinate duration: 滑动时长(毫秒) / Swipe duration in milliseconds contact: 触点编号 (Adb 控制器
(
self,
x1: int,
y1: int,
x2: int,
y2: int,
duration: int,
contact: int = 0,
pressure: int = 1,
)
| 84 | return self._gen_ctrl_job(ctrl_id) |
| 85 | |
| 86 | def post_swipe( |
| 87 | self, |
| 88 | x1: int, |
| 89 | y1: int, |
| 90 | x2: int, |
| 91 | y2: int, |
| 92 | duration: int, |
| 93 | contact: int = 0, |
| 94 | pressure: int = 1, |
| 95 | ) -> Job: |
| 96 | """滑动 / Swipe |
| 97 | |
| 98 | Args: |
| 99 | x1: 起点 x 坐标 / Start x coordinate |
| 100 | y1: 起点 y 坐标 / Start y coordinate |
| 101 | x2: 终点 x 坐标 / End x coordinate |
| 102 | y2: 终点 y 坐标 / End y coordinate |
| 103 | duration: 滑动时长(毫秒) / Swipe duration in milliseconds |
| 104 | contact: 触点编号 (Adb 控制器: 手指编号; Win32 控制器: 鼠标按键 0:左键, 1:右键, 2:中键) |
| 105 | Contact number (Adb controller: finger number; Win32 controller: mouse button 0:left, |
| 106 | 1:right, 2:middle) |
| 107 | pressure: 触点力度 / Contact pressure |
| 108 | |
| 109 | Returns: |
| 110 | Job: 作业对象 / Job object |
| 111 | """ |
| 112 | ctrl_id = Library.framework().MaaControllerPostSwipeV2( |
| 113 | self._handle, x1, y1, x2, y2, duration, contact, pressure |
| 114 | ) |
| 115 | return self._gen_ctrl_job(ctrl_id) |
| 116 | |
| 117 | def post_press_key(self, key: int) -> Job: |
| 118 | """ |
nothing calls this directly
no test coverage detected