public override void Update(GameTime gameTime) { if (selected && menuScreen != null && enabled && inScrollView && ((PlayerControls.MouseLeftPressed() && BoundingRect().Contains(PlayerControls.MousePosition())) || GlobalControls.ConfirmPressed() || PlayerControls.ConfirmPressed(ControlsConfig.keyboardControllerIndex))) { SelectionClicked(); menuScreen.ButtonClicked(this); Globals.soundEffectsManager.PlaySoundEffect(SoundEffects.MenuConfirm, false, SoundEffectsManager.zeroPanVectorLocation); } }
public static bool ConfirmPressed() { foreach (int controllerIndex in ControlsConfig.GetAllControllerIndexes()) { if (PlayerControls.ConfirmPressed(controllerIndex)) { return(true); } } return(false); }