kxgames / glooey

An object-oriented GUI library for pyglet.
MIT License
91 stars 6 forks source link

on_click function doesn't work #13

Closed miswanting closed 6 years ago

miswanting commented 6 years ago

I use glooey to build my main menu, it is fine and respond correctly when my mouse over it. Everything is just good except on_click function. No respond. Then I tried the example below and it shows good but when I click it, it just doesn't respond, too. http://glooey.readthedocs.io/en/latest/_downloads/button.py What's the problem?

Python 3.6.3 on Windows 10 Anaconda 5.0.1

benmoran56 commented 6 years ago

This is not my project, but I think there may be a general bug related to mouse click/release. Please try this simple script here, and see if you have the same problem: https://bitbucket.org/pyglet/pyglet/issues/130/mouse-release-event-not-triggered

miswanting commented 6 years ago

@benmoran56 I tried the code and there's only releases. It seems like a bug of pyglet, right?

benmoran56 commented 6 years ago

Yes, this is a pyglet bug. If you are installing from pip, can you try upgrading to the current alpha version? pip install pyglet==1.4.0a1

miswanting commented 6 years ago

@benmoran56 It works! Thank you for your help!

benmoran56 commented 6 years ago

No worries!