Exemple #1
0
 void UpdateTitleMenuInput()
 {
     if (titleMenu.Update(inputHelper.GetMousePosition(), inputHelper.CheckForLeftHold(), inputHelper.CheckForLeftRelease()))
     {
         titleMenu.Select();
     }
     if (inputHelper.CheckForKeyboardPress(Keys.Enter) || inputHelper.CheckForGamepadPress(Buttons.Start) || inputHelper.CheckForGamepadPress(Buttons.A))
     {
         titleMenu.Select();
     }
     else if (inputHelper.CheckForKeyboardPress(Keys.Escape) || inputHelper.CheckForGamepadPress(Buttons.Back))
     {
         Exit();
     }
     else if (inputHelper.CheckForKeyboardPress(Keys.Down) || inputHelper.CheckForGamepadPress(Buttons.DPadDown))
     {
         titleMenu.Move(1);
     }
     else if (inputHelper.CheckForKeyboardPress(Keys.Up) || inputHelper.CheckForGamepadPress(Buttons.DPadUp))
     {
         titleMenu.Move(-1);
     }
 }