// ==================================================================== // Written by Jack Porter // (c) 2002, Epic Games, Inc. All Rights Reserved // ==================================================================== class ServerBrowser extends UT2K3GUIPage; // if _RO_ // else //#exec OBJ LOAD FILE=InterfaceContent.utx // end if _RO_ var Browser_Page MOTDPage; var Browser_Page DMServerListPage; var Browser_Page TDMServerListPage; var Browser_Page CTFServerListPage; var Browser_Page BRServerListPage; var Browser_Page DomServerListPage; var Browser_Page CustomServerListPage; var Browser_Page FavoritesPage; var Browser_Page LANPage; var Browser_Page PrefsPage; var Browser_Page BuddiesPage; var Browser_Page IRCPage; var bool bCreatedQueryTabs; var bool bCreatedStandardTabs; var localized string MutantTypeName, InvasionTypeName, LMSTypeName; var localized string MutantType, InvasionType, LMSType; // Filtering options var() config bool bOnlyShowStandard; var() config bool bOnlyShowNonPassword; var() config bool bDontShowFull; var() config bool bDontShowEmpty; var() config bool bDontShowWithBots; var() config string DesiredMutator; var() config string DesiredMutator2; var() config string CustomQuery; var() config int MinGamespeed, MaxGamespeed; var() config enum EViewMutatorMode { VMM_AnyMutators, VMM_NoMutators, VMM_ThisMutator, VMM_NotThisMutator } ViewMutatorMode, ViewMutator2Mode; var() config enum EStatsServerView { SSV_Any, SSV_OnlyStatsEnabled, SSV_NoStatsEnabled, } StatsServerView; var() config enum EWeaponStayServerView { WSSV_Any, WSSV_OnlyWeaponStay, WSSV_NoWeaponStay, } WeaponStayServerView; var() config enum ETranslocServerView { TSV_Any, TSV_OnlyTransloc, TSV_NoTransloc, } TranslocServerView; function InitComponent(GUIController MyController, GUIComponent MyOwner) { Super.InitComponent(MyController, MyOwner); GUITitleBar(Controls[0]).DockedTabs = GUITabControl(Controls[1]); // delegates OnClose = InternalOnClose; // Add pages if(!bCreatedStandardTabs) { AddBrowserPage(MOTDPage); AddBrowserPage(PrefsPage); AddBrowserPage(IRCPage); AddBrowserPage(LANPage); AddBrowserPage(FavoritesPage); bCreatedStandardTabs=true; } } // Do we have the bonus pack installed? function bool HaveBonusPack() { local Object Test; Test = DynamicLoadObject("BonusPack.xMutantGame", class'Class'); if(Test == None) return false; Test = DynamicLoadObject("SkaarjPack.Invasion", class'Class'); if(Test == None) return false; return true; } // See if we have any custom game types (is this too slow?) function bool HaveCustomGameTypes() { local string Entry, Desc; local int Index; // Find other game types from .int files, and create tabs Index = 0; PlayerOwner().GetNextIntDesc("GameInfo",Index,Entry,Desc); while (Entry != "") { Desc = Entry$"|"$Desc; // If its not a standard game type, we have a custom one. if ( !class'Browser_ServerListPageMSCustom'.static.IsStandardGameType(Desc) ) return true; Index++; PlayerOwner().GetNextIntDesc("GameInfo", Index, Entry, Desc); } // No custom game types found return false; } function MOTDVerified(bool bMSVerified) { local Browser_ServerListPageMS NewPage; if( bCreatedQueryTabs ) return; bCreatedQueryTabs = true; AddBrowserPage(BuddiesPage); // Create tabs for 'standard' game types AddBrowserPage(DMServerListPage); AddBrowserPage(TDMServerListPage); if(!PlayerOwner().Level.IsDemoBuild()) AddBrowserPage(DomServerListPage); AddBrowserPage(CTFServerListPage); AddBrowserPage(BRServerListPage); if( HaveBonusPack() ) { NewPage = new(None) class'Browser_ServerListPageMS'; NewPage.GameType = InvasionType; NewPage.PageCaption = InvasionTypeName; AddBrowserPage(NewPage); NewPage = new(None) class'Browser_ServerListPageMS'; NewPage.GameType = LMSType; NewPage.PageCaption = LMSTypeName; AddBrowserPage(NewPage); NewPage = new(None) class'Browser_ServerListPageMS'; NewPage.GameType = MutantType; NewPage.PageCaption = MutantTypeName; AddBrowserPage(NewPage); } if( HaveCustomGameTypes() ) AddBrowserPage(CustomServerListPage); } function AddBrowserPage( Browser_Page NewPage ) { local GUITabControl TabC; NewPage.Browser = Self; TabC = GUITabControl(Controls[1]); TabC.AddTab(NewPage.PageCaption,"", NewPage); } delegate OnAddFavorite( GameInfo.ServerResponseLine Server ); function InternalOnClose(optional Bool bCanceled) { local int i; local GUITabControl TabC; TabC = GUITabControl(Controls[1]); for( i=0;i