feat: add click multi

This commit is contained in:
rankun 2020-08-02 12:46:33 +08:00
commit 41cc42a96d
7 changed files with 184 additions and 5 deletions

View file

@ -35,6 +35,7 @@ There are several types of key mapping as follows:
-type The type of key mapping, each element in keyMapNodes needs to be specified, and can be of the following types:
-KMT_CLICK Ordinary click, key press simulates finger press, key lift simulates finger lift
-KMT_CLICK_TWICE Double click, key press simulates finger press and then lift, key lift simulates finger press and then lift
- KMT_CLICK_MULTI Click multiple times. According to the delay and pos in the clickNodes array, press one key to simulate touching multiple positions
-KMT_DRAG drag and drop, the key press is simulated as a finger press and drag a distance, the key lift is simulated as a finger lift
-KMT_STEER_WHEEL steering wheel mapping, which is dedicated to the mapping of the steering wheel for moving characters in FPS games, requires 4 buttons to cooperate.
@ -47,7 +48,11 @@ Description of the unique attributes of different key mapping types:
-KMT_CLICK_TWICE
-key The key code to be mapped
-pos simulates the location of the touch
-pos Simulates the location of the touch
-KMT_CLICK_MULTI
-delay Delay `delay` ms before simulating touch
-pos Simulates the location of the touch
-KMT_DRAG
-key The key code to be mapped

View file

@ -35,6 +35,7 @@
- type 按键映射的类型每个keyMapNodes中的元素都需要指明可以是如下类型
- KMT_CLICK 普通点击,按键按下模拟为手指按下,按键抬起模拟为手指抬起
- KMT_CLICK_TWICE 两次点击,按键按下模拟为手指按下再抬起,按键抬起模拟为手指按下再抬起
- KMT_CLICK_MULTI 多次点击根据clickNodes数组中的delay和pos实现一个按键多次点击
- KMT_DRAG 拖拽,按键按下模拟为手指按下并拖动一段距离,按键抬起模拟为手指抬起
- KMT_STEER_WHEEL 方向盘映射专用于FPS游戏中移动人物脚步的方向盘的映射需要4个按键来配合。
@ -49,6 +50,10 @@
- key 要映射的按键码
- pos 模拟触摸的位置
- KMT_CLICK_MULTI
- delay 延迟delay毫秒以后再模拟触摸
- pos 模拟触摸的位置
- KMT_DRAG
- key 要映射的按键码
- startPos 模拟触摸拖动的开始位置