Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UBrowser.UBrowserMainClientWindow


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
//=============================================================================
// UBrowserMainClientWindow - The main client area
//=============================================================================
class UBrowserMainClientWindow extends UWindowClientWindow;

var UWindowPageControl      PageControl;
var UBrowserOpenBar         OpenBar;

var UWindowPageControlPage  Favorites;
var localized string        FavoritesName;

var() globalconfig string ServerListNames[20];
var() globalconfig string ServerListTags[20];

var() globalconfig string ListFactories0[20];
var() globalconfig string ListFactories1[20];
var() globalconfig string ListFactories2[20];
var() globalconfig string ListFactories3[20];
var() globalconfig string ListFactories4[20];
var() globalconfig string ListFactories5[20];
var() globalconfig string ListFactories6[20];
var() globalconfig string ListFactories7[20];
var() globalconfig string ListFactories8[20];
var() globalconfig string ListFactories9[20];
var() globalconfig string URLAppend[20];
var() globalconfig int  AutoRefreshTime[20];

var UBrowserServerListWindow FactoryWindows[20];

const OpenBarHeight=30;

function Created() 
{
    local int i, f;
    local UWindowPageControlPage P;
    local UBrowserServerListWindow W;

    PageControl = UWindowPageControl(CreateWindow(class'UWindowPageControl', 0, OpenBarHeight, WinWidth, WinHeight-OpenBarHeight));
    
    // Add favorites
    Favorites = PageControl.AddPage(FavoritesName, class'UBrowserFavoriteServers');

    for(i=0; i<20; i++)
    {
        if(ServerListNames[i] == "")
            break;

        P = PageControl.AddPage(ServerListNames[i], class'UBrowserServerListWindow');
        W = UBrowserServerListWindow(P.Page);

        W.ListFactories[0] = ListFactories0[i];
        W.ListFactories[1] = ListFactories1[i];
        W.ListFactories[2] = ListFactories2[i];
        W.ListFactories[3] = ListFactories3[i];
        W.ListFactories[4] = ListFactories4[i];
        W.ListFactories[5] = ListFactories5[i];
        W.ListFactories[6] = ListFactories6[i];
        W.ListFactories[7] = ListFactories7[i];
        W.ListFactories[8] = ListFactories8[i];
        W.ListFactories[9] = ListFactories9[i];

        W.URLAppend = URLAppend[i];
        W.AutoRefreshTime = AutoRefreshTime[i];

        FactoryWindows[i] = W;
    }

    for(i=0; i<20; i++)
        if(FactoryWindows[i] != None)
            FactoryWindows[i].Refresh(False, True);

    OpenBar = UBrowserOpenBar(CreateWindow(class'UBrowserOpenBar', 0, 0, WinWidth, OpenBarHeight));

    Super.Created();
    SaveConfig();
}

function Resized()
{
    local float Y;

    Y = 0;
    
    if(OpenBar.bWindowVisible)
    {
        OpenBar.SetSize(WinWidth, OpenBarHeight); 
        Y += OpenBarHeight;
    }

    PageControl.WinTop = Y;
    PageControl.SetSize(WinWidth, WinHeight-Y);
}

function Paint(Canvas C, float X, float Y)
{
    DrawStretchedTexture(C, 0, 0, WinWidth, WinHeight, Texture'BlackTexture');
}

function SaveConfigs()
{
    SaveConfig();
}

defaultproperties
{
     FavoritesName="Favorites"
     ServerListNames(0)="All 224 Servers"
     ServerListNames(1)="LAN Servers"
     ServerListNames(2)="Populated 224 Servers"
     ServerListNames(3)="Deathmatch"
     ServerListNames(4)="Team Games"
     ServerListNames(5)="DarkMatch"
     ServerListNames(6)="Coop Games"
     ServerListNames(7)="All Servers"
     ServerListTags(0)="224"
     ServerListTags(1)="LAN"
     ServerListTags(2)="Populated"
     ServerListTags(3)="Deathmatch"
     ServerListTags(4)="TeamGames"
     ServerListTags(5)="DarkMatch"
     ServerListTags(6)="Coop"
     ServerListTags(7)="All"
     ListFactories0(0)="UBrowser.UBrowserSubsetFact,SupersetTag=All,bCompatibleServersOnly=True"
     ListFactories0(1)="UBrowser.UBrowserLocalFact"
     ListFactories0(2)="UBrowser.UBrowserSubsetFact,SupersetTag=All,MinPlayers=1,bCompatibleServersOnly=True"
     ListFactories0(3)="UBrowser.UBrowserSubsetFact,SupersetTag=All,GameType=DeathMatch,bCompatibleServersOnly=True"
     ListFactories0(4)="UBrowser.UBrowserSubsetFact,SupersetTag=All,GameType=Team Game,bCompatibleServersOnly=True"
     ListFactories0(5)="UBrowser.UBrowserSubsetFact,SupersetTag=All,GameType=DarkMatch,bCompatibleServersOnly=True"
     ListFactories0(6)="UBrowser.UBrowserSubsetFact,SupersetTag=All,GameType=Coop Game,bCompatibleServersOnly=True"
     ListFactories0(7)="UBrowser.UBrowserGSpyFact,MasterServerAddress=master0.gamespy.com,MasterServerTCPPort=28900,Region=0"
     URLAppend(1)="?LAN"
     AutoRefreshTime(1)=10
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 12:48:02.000 - Creation time: za 22-4-2006 12:49:39.593 - Created with UnCodeX