Exemplo n.º 1
0
        public override void ProcessKeyboard(SadConsole.Console console, Keyboard info, out bool handled)
        {
            // Exit
            if (info.IsKeyPressed(Microsoft.Xna.Framework.Input.Keys.Q))
            {
                SadConsole.Game.Instance.Exit();
            }

            // Keyboard control of menu
            if (info.IsKeyPressed(Microsoft.Xna.Framework.Input.Keys.Up))
            {
                Parent.MenuUp();
            }
            else if (info.IsKeyPressed(Microsoft.Xna.Framework.Input.Keys.Down))
            {
                Parent.MenuDown();
            }

            if (info.IsKeyPressed(Microsoft.Xna.Framework.Input.Keys.Enter))
            {
                Parent.MenuSelect();
            }

            handled = true;
        }