mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-06-09 22:14:51 +00:00
feat: add function for button click with interval
This commit is contained in:
@@ -128,6 +128,14 @@ class ModuleBase:
|
|||||||
self.device.click(button)
|
self.device.click(button)
|
||||||
return appear
|
return appear
|
||||||
|
|
||||||
|
def click_with_interval(self, button, interval=5):
|
||||||
|
if interval and not self.interval_is_reached(button, interval=interval):
|
||||||
|
return False
|
||||||
|
self.device.click(button)
|
||||||
|
if interval:
|
||||||
|
self.interval_reset(button, interval=interval)
|
||||||
|
return True
|
||||||
|
|
||||||
def wait_until_stable(self, button, timer=Timer(0.3, count=1), timeout=Timer(5, count=10)):
|
def wait_until_stable(self, button, timer=Timer(0.3, count=1), timeout=Timer(5, count=10)):
|
||||||
"""
|
"""
|
||||||
A terrible method, don't rely too much on it.
|
A terrible method, don't rely too much on it.
|
||||||
|
|||||||
Reference in New Issue
Block a user