I’m currently having a problem where when I click on a single button, the game decides to click the one that gets put in the same place as it. This gets extremely annoying when i’m trying to change levels. This is my MouseReleased() function.
public void mouseReleased(MouseEvent e) {
MouseClick = false;
GuiManager.isButtonPressed(mx, my);
}
And this is where the it’s checked to see if you click the buttons.(I don’t know if adding this helps)
public static void isButtonPressed(int mx, int my){
mx = mx /3;
my = my / 3;
for(int counter = 0;counter < Buttons.size();counter++){
if (Buttons.get(counter).box.contains(mx, my)){
Buttons.get(counter).Press();
continue;
}
}
}
Can anyone offer a path to a solution for this?