( this: Instance, input: PointerInput, )
| 34 | } |
| 35 | |
| 36 | export async function pointer( |
| 37 | this: Instance, |
| 38 | input: PointerInput, |
| 39 | ): Promise<void> { |
| 40 | const {pointerMap} = this.config |
| 41 | |
| 42 | const actions: PointerAction[] = [] |
| 43 | ;(Array.isArray(input) ? input : [input]).forEach(actionInput => { |
| 44 | if (typeof actionInput === 'string') { |
| 45 | actions.push(...parseKeyDef(pointerMap, actionInput)) |
| 46 | } else if ('keys' in actionInput) { |
| 47 | actions.push( |
| 48 | ...parseKeyDef(pointerMap, actionInput.keys).map(i => ({ |
| 49 | ...actionInput, |
| 50 | ...i, |
| 51 | })), |
| 52 | ) |
| 53 | } else { |
| 54 | actions.push(actionInput) |
| 55 | } |
| 56 | }) |
| 57 | |
| 58 | for (let i = 0; i < actions.length; i++) { |
| 59 | await wait(this.config) |
| 60 | |
| 61 | await pointerAction(this, actions[i]) |
| 62 | } |
| 63 | |
| 64 | this.system.pointer.resetClickCount() |
| 65 | } |
| 66 | |
| 67 | async function pointerAction(instance: Instance, action: PointerAction) { |
| 68 | const pointerName = |
nothing calls this directly
no test coverage detected