protected override void OnMouseDown(MouseButtonEventArgs e) { base.OnMouseDown(e); if (Mouse.X > 199 && Mouse.X < 400) { if (Mouse.Y > 99 && Mouse.Y < 150) { //Resume Game Clicked currentGame.MakeCurrent(); this.Close(); } else if (Mouse.Y > 199 && Mouse.Y < 250) { //Main Menu Clicked this.Close(); currentGame.networkManager.setActive(false); currentGame.networkManager.closeSocket(); currentGame.Close(); using (MainMenu main = new MainMenu()) { main.Run(); } } else if (Mouse.Y > 299 && Mouse.Y < 350) { this.Close(); currentGame.Close(); Environment.Exit(0); } } }