public void keyboardButtonClicked(Microsoft.Xna.Framework.Input.Keys buttonPressed) { if (buttonPressed.Equals(Microsoft.Xna.Framework.Input.Keys.OemPlus)) { this.zoom += 0.1f; if (this.zoom > 1.5f) { this.zoom = 1.5f; } } if (buttonPressed.Equals(Microsoft.Xna.Framework.Input.Keys.OemMinus)) { this.zoom -= 0.1f; if (this.zoom < 0.5f) { this.zoom = 0.5f; } } if (buttonPressed.Equals(Microsoft.Xna.Framework.Input.Keys.Z)) { if (this.zoom == 0.1f) { this.zoom = 1.0f; } else { this.zoom = 0.1f; } } }
public override void OnKeyDown(Microsoft.Xna.Framework.Input.Keys key) { // HACK Write keydowns to debug box for debug purposes. Change key handling for proper release. System.Diagnostics.Debug.WriteLine(key.ToString()); if (key.Equals(Keys.Back) && !keyboardHandler.Typing) { currentGame.screenManager.FocusScreen(GameScreen.TITLE_MAINMENU); } }