def detect_position(self):
screen = ag.screenshot()
for name, offset_x, offset_y in [('start', 288, 252), ('select_title', 28, 24)]:
position = self.find_image(screen, self.images[name])
if position != None:
x, y = position
x -= offset_x
y -= offset_y
self.set_position(x, y)
return (x, y)
return None
评论列表
文章目录