Skip to content

Commit e1ab1b3

Browse files
authored
Merge pull request #32 from lf2a/fix-haystack-missing-argument
FIX: missing argument on 'locate_all_opencv()'
2 parents 2dec375 + 1a3b073 commit e1ab1b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

botcity/web/bot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,9 @@ def get_element_coords(self, label, x=None, y=None, width=None, height=None, mat
764764
if not best:
765765
print('Warning: Ignoring best=False for now. It will be supported in the future.')
766766

767-
it = cv2find.locate_all_opencv(self.state.map_images[label], region=region, confidence=matching)
767+
haystack = self.get_screen_image()
768+
it = cv2find.locate_all_opencv(self.state.map_images[label], haystack_image=haystack,
769+
region=region, confidence=matching)
768770
try:
769771
ele = next(it)
770772
except StopIteration:

0 commit comments

Comments
 (0)