Exemplo n.º 1
0
 public override bool KeyDown(GorgonLibrary.InputDevices.KeyboardInputEventArgs e)
 {
     if (_name.KeyDown(e))
     {
         _currentSystem.Name = _name.Text;
         return(true);
     }
     return(false);
 }
Exemplo n.º 2
0
 public override bool KeyDown(GorgonLibrary.InputDevices.KeyboardInputEventArgs e)
 {
     if (_showingText)
     {
         if ((e.Key == GorgonLibrary.InputDevices.KeyboardKeys.Enter || e.Key == GorgonLibrary.InputDevices.KeyboardKeys.Return) && !string.IsNullOrEmpty(_nameTextBox.Text))
         {
             _starSystem.Name = _nameTextBox.Text;
             _colonizing      = false;
             _showingText     = false;
             //Done
             if (Completed != null)
             {
                 Completed();
             }
         }
         _nameTextBox.KeyDown(e);
     }
     else if (e.Key == GorgonLibrary.InputDevices.KeyboardKeys.Enter || e.Key == GorgonLibrary.InputDevices.KeyboardKeys.Return)
     {
         _showingText    = true;
         _landingShipPos = _gameMain.ScreenHeight / 2 + 50;
     }
     return(true);
 }