Skip to content

[gui] fix PushButton on_release #1397

@CastixGitHub

Description

@CastixGitHub
diff --git a/pyglet/gui/widgets.py b/pyglet/gui/widgets.py
index 4ba66dd0..94513af2 100644
--- a/pyglet/gui/widgets.py
+++ b/pyglet/gui/widgets.py
@@ -265,7 +265,7 @@ class PushButton(WidgetBase):
             return
         self._sprite.image = self._unpressed_img
         self._pressed = False
-        self.dispatch_event('on_release')
+        self.dispatch_event('on_release', self)

     def on_mouse_motion(self, x: int, y: int, dx: int, dy: int) -> None:
         if not self.enabled or self._pressed:

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions