public void KeyDown(KeyboardInputEventArgs e) { if (_windowShowing != null) { if (!_windowShowing.KeyDown(e)) { if (e.Key == KeyboardKeys.Escape) { //Parent window didn't handle escape, so close window //Close the current window CloseWindow(); return; } } return; } if (e.Key == KeyboardKeys.Escape) { Empire currentEmpire = _gameMain.EmpireManager.CurrentEmpire; StarSystem selectedSystem = currentEmpire.SelectedSystem; FleetGroup selectedFleetGroup = currentEmpire.SelectedFleetGroup; if (selectedFleetGroup != null) { currentEmpire.SelectedFleetGroup = null; } if (selectedSystem != null) { currentEmpire.SelectedSystem = null; } return; } if (_gameMain.EmpireManager.CurrentEmpire.SelectedSystem != null) { if (_systemView.KeyDown(e)) { return; } } if (e.Key == KeyboardKeys.F) { _showingRadarRange = false; _showingFuelRange = !_showingFuelRange; } if (e.Key == KeyboardKeys.R) { _showingFuelRange = false; _showingRadarRange = !_showingRadarRange; } if (e.Key == KeyboardKeys.B) { _showingOwners = !_showingOwners; //This does not affect the other two toggable views since it only changes the stars' color } if (e.Key == KeyboardKeys.Escape) { _taskBar.SetToScreen(Screen.InGameMenu); ShowInGameMenu(); } if (e.Key == KeyboardKeys.Space) { _gameMain.ToggleSitRep(); } }