I am making a main menu game state and have come across a problem. I have two textures for each button in order to indicate which button is currently selected. The problem I have is when the player presses the down key from the first button, it doesn't stop at the middle button, but goes all the way down to the third button. How can I have it pause at the middle button, before going down to the bottom button?
//Menu selections
private void MainMenuSelection()
{
// If player presses down arrow, highlight credits
if (Keyboard.GetState(p1.pNumber).IsKeyDown(Keys.Down))
{
playButton.active = false;
creditsButton.active = true;
}
// If player presses down again, highlight credits
if (Keyboard.GetState(p1.pNumber).IsKeyDown(Keys.Down))
{
creditsButton.active = false;
exitButton.active = true;
}