Skip to content

Commit

Permalink
Add second coords
Browse files Browse the repository at this point in the history
Touching two buttons at once does not work as expected
  • Loading branch information
exussum12 authored Jan 7, 2025
1 parent e4653a9 commit 5b2a103
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/py_frozen/touch.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def _handle_touch(self, pin):
if self.state:
if self.x >= button.x and self.x <= button.x + button.w and self.y >= button.y and self.y <= button.y + button.h:
button.pressed = True
elif self.x2 >= button.x and self.x2 <= button.x + button.w and self.y2 >= button.y and self.y2 <= button.y + button.h:
button.pressed = True
else:
button.pressed = False
else:
Expand Down

0 comments on commit 5b2a103

Please sign in to comment.