Skip to content

Commit

Permalink
touch.py: stopped unpressed buttons showing as pressed while 'touch.s…
Browse files Browse the repository at this point in the history
…tate' was True
  • Loading branch information
thirdr committed Dec 17, 2024
1 parent 605f9f6 commit a5714f2
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,5 +99,7 @@ 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
else:
button.pressed = False
else:
button.pressed = False

0 comments on commit a5714f2

Please sign in to comment.