Dec-28-2016, 09:04 AM
Hi there.
I'm having trouble creating various menus with Pygame, since some of the menu buttons, although on different menu screens, share the same coordinates. So once one gets pressed, the next screen detects the button still being pressed and automatically triggers as well.
I'm wondering whether the variable imbued with .get_pressed() could be reset to it's original state, aka no buttons active?
I've tried to set a delay, but the issue persists through it, and changing the mouse position after the first press would seem like an unsuitable solution from the viewpoint of the Player - a simplistic menu that has to reset mouse position after every press?
As a note, the different menu screens are in the same general function, split between parts of it, to make navigating easier.
I'm having trouble creating various menus with Pygame, since some of the menu buttons, although on different menu screens, share the same coordinates. So once one gets pressed, the next screen detects the button still being pressed and automatically triggers as well.
I'm wondering whether the variable imbued with .get_pressed() could be reset to it's original state, aka no buttons active?
I've tried to set a delay, but the issue persists through it, and changing the mouse position after the first press would seem like an unsuitable solution from the viewpoint of the Player - a simplistic menu that has to reset mouse position after every press?
As a note, the different menu screens are in the same general function, split between parts of it, to make navigating easier.