Beyond_Beyaan.Screens.NewGame.KeyDown C# (CSharp) Method

KeyDown() public method

public KeyDown ( KeyboardInputEventArgs e ) : void
e KeyboardInputEventArgs
return void
        public void KeyDown(KeyboardInputEventArgs e)
        {
            if (_generatingGalaxy)
            {
                return;
            }
            if (e.Key == KeyboardKeys.Escape)
            {
                if (_showingSelection)
                {
                    //Close the race selection
                    _showingSelection = false;
                    return;
                }
                _gameMain.ChangeToScreen(Screen.MainMenu);
            }
            if (_playerEmperorName.KeyDown(e))
            {
                return;
            }
            if (_playerHomeworldName.KeyDown(e))
            {
                return;
            }
        }