Skip to content

Commit

Permalink
fix mouse button always set to None in handlers (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
tushar5526 committed Dec 4, 2023
1 parent a96a0e7 commit c579826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p5/sketch/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def _update_builtins(self):
builtins.mouse_x = self.x
builtins.mouse_y = self.y
builtins.mouse_is_pressed = self._active
builtins.mouse_button = self.button if self.pressed else None
builtins.mouse_button = self.button
builtins.moved_x = builtins.mouse_x - builtins.pmouse_x
builtins.moved_y = builtins.mouse_y - builtins.pmouse_y

Expand Down

0 comments on commit c579826

Please sign in to comment.