long_click.py 652 B

12345678910111213141516171819202122232425
  1. # This Python file uses the following encoding: utf-8
  2. # @author runhey
  3. # github https://github.com/runhey
  4. import numpy as np
  5. from module.base.decorator import cached_property
  6. from module.logger import logger
  7. from module.atom.click import RuleClick
  8. class RuleLongClick(RuleClick):
  9. def __init__(self, roi_front: tuple, roi_back: tuple, duration: int = 1000, name: str=None) -> None:
  10. """
  11. 初始化
  12. :param roi_front:
  13. :param roi_back:
  14. :param duration:
  15. """
  16. if not name:
  17. name = 'long_click'
  18. super().__init__(roi_front, roi_back, name=name)
  19. self.duration = duration