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.
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!