From bbce4368d9235d267a8c63686ec5b7078b712693 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 30 May 2011 20:23:12 +1200 Subject: [PATCH] Remove some crap from ra ServerBrowserLogic --- OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs index 7e11bf2f77..6e093b4ced 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs @@ -18,8 +18,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic { public class ServerBrowserLogic { - static List GameButtons = new List(); - GameServer currentServer = null; ScrollItemWidget ServerTemplate; @@ -31,9 +29,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic bg.GetWidget("JOINSERVER_PROGRESS_TITLE").Visible = true; bg.GetWidget("JOINSERVER_PROGRESS_TITLE").Text = "Fetching game list..."; - bg.Children.RemoveAll(a => GameButtons.Contains(a)); - GameButtons.Clear(); - ServerList.Query(RefreshServerList); bg.GetWidget("SERVER_INFO").IsVisible = () => currentServer != null; @@ -62,12 +57,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic { bg.GetWidget("JOINSERVER_PROGRESS_TITLE").Visible = true; bg.GetWidget("JOINSERVER_PROGRESS_TITLE").Text = "Fetching game list..."; - - bg.Children.RemoveAll(a => GameButtons.Contains(a)); - GameButtons.Clear(); + sl.RemoveChildren(); + currentServer = null; ServerList.Query(RefreshServerList); - return true; };