My Menu has a START and a QUIT option. I'm using a controller's D-PAD for selection. The game begins with START highlighted. When I push the down button on the D-PAD, it highlights the QUIT option. Problem is when I release the down button, it returns to highlighting START.
Is there a way to possibly hold the position so that if I highlight QUIT, it will stay highlighted after releasing the button?
//First starts with START highlighted:
if(menuSelect == 1 && GC.getDPADDir() == 7){ // if QUIT is highlighted, push up
menuSelect++;
}
else if(GC.isButtonPressed(1)){
// go to game
sbg.enterState(1);
}
if(menuSelect == 2 && GC.getDPADDir() == 1){ // if start is highlighted, push down
menuSelect--;
}
else if(GC.isButtonPressed(1)){
// quit
System.exit(0);
}
