Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay, algorithm, and play/stop buttons are too responsive #187

Open
chenrbin opened this issue Feb 1, 2024 · 0 comments
Open

Delay, algorithm, and play/stop buttons are too responsive #187

chenrbin opened this issue Feb 1, 2024 · 0 comments

Comments

@chenrbin
Copy link

chenrbin commented Feb 1, 2024

Description
These update function for boxes currently check if the mouse button is pressed and if the mouse position collides with the rectangle. They can be registered as active by moving the mouse over the boxes while the mouse button is held down, which produces some unnatural-seeming behavior. This can be observed by dragging the mouse across the bottom menu. Notably, dragging the mouse across the play button results in the algorithm running multiple times.

Solution
Adjust the update function for these boxes to check for a mouse button down event, which will let them register as active only once per click. Additionally, the slide box logic can be reworked such that the slider will match the held mouse's x position while within the box horizontal bounds if the box is clicked but unresponsive if the box is not clicked.

I would like to implement this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant