override protected void KeyPressing() { if (KeyboardUtility.WasClicked(Keys.Escape) == true || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.B)) { MenuSelected(this, EventArgs.Empty); } }
virtual public void Draw(SpriteBatch aSpriteBatch) { DrawUnchangingText(aSpriteBatch); if (XboxControllerUtility.ControllerConnected(PlayerIndex.One)) { DrawXboxControllerInstructions(aSpriteBatch); } else { DrawKeyboardInstructions(aSpriteBatch); } }
override protected void KeyPressing() { if (KeyboardUtility.WasClicked(Keys.Enter) || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.A)) { StartSelected(this, EventArgs.Empty); } else if (KeyboardUtility.WasClicked(Keys.Space) || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.Y)) { HighscoreSelected(this, EventArgs.Empty); } else if (KeyboardUtility.WasClicked(Keys.O)) //EJ stöd av XboxControll. { OptionsSelected(this, EventArgs.Empty); } else if (KeyboardUtility.WasClicked(Keys.Escape) || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.B)) { ExitSelected(this, EventArgs.Empty); } }
private void UpdateUtilities() { KeyboardUtility.Update(); XboxControllerUtility.Update(); }