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

GUI2K4.UT2K4Browser_Footer


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
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
//====================================================================
//  UT2K4 footer panel
//
//  Written by Ron Prestenback
//  (c) 2003, Epic Games, Inc.  All Rights Reserved
// ====================================================================
class UT2K4Browser_Footer extends ButtonFooter;

var automated GUIImage          i_Status;
var automated moCheckBox        ch_Standard;
var automated GUITitleBar       t_StatusBar;
var automated GUIButton b_Join, b_Spectate, b_Back, b_Refresh, b_Filter;

var UT2K4ServerBrowser p_Anchor;

function bool InternalOnClick(GUIComponent Sender)
{
    if (GUIButton(Sender) == None)
        return false;

    if (Sender == b_Back)
    {
        Controller.CloseMenu(False);
        return true;
    }

    if ( Sender == b_Join )
    {
        p_Anchor.JoinClicked();
        return true;
    }

    if ( Sender == b_Spectate )
    {
        p_Anchor.SpectateClicked();
        return true;
    }

    if ( Sender == b_Refresh )
    {
        p_Anchor.RefreshClicked();
        return true;
    }

    if ( Sender == b_Filter )
    {
        p_Anchor.FilterClicked();
        return true;
    }


    return false;
}

function UpdateActiveButtons(UT2K4Browser_Page CurrentPanel)
{
    if (CurrentPanel == None)
        return;

    UpdateButtonState( b_Join,     CurrentPanel.IsJoinAvailable( b_Join.Caption ) );
    UpdateButtonState( b_Refresh,  CurrentPanel.IsRefreshAvailable( b_Refresh.Caption ) );
    UpdateButtonState( b_Spectate, CurrentPanel.IsSpectateAvailable( b_Spectate.Caption ) );
    UpdateButtonState( b_Filter,   CurrentPanel.IsFilterAvailable( b_Filter.Caption ) );

    if ( b_Filter.MenuState == MSAT_Disabled )
        ch_Standard.Hide();
    else ch_Standard.Show();
}


function UpdateButtonState( GUIButton But, bool Active )
{
    if ( Active )
        EnableComponent(But);
    else DisableComponent(But);
}

function PositionButtons( Canvas C )
{
    local bool b;

    b                 = b_Filter.bVisible;
    b_Filter.bVisible = false;

    super.PositionButtons(C);

    b_Filter.bVisible = b;
    b_Filter.WinLeft  = GetMargin();
}

function float GetButtonLeft()
{
    local bool bWasVisible;
    local float Result;

    bWasVisible = b_Filter.bVisible;
    b_Filter.bVisible = False;

    Result = Super.GetButtonLeft();
    b_Filter.bVisible = bWasVisible;

    return Result;
}

defaultproperties
{
     Begin Object Class=moCheckBox Name=OnlyStandardCheckBox
         CaptionWidth=0.900000
         Caption="Standard Servers Only"
         OnCreateComponent=OnlyStandardCheckBox.InternalOnCreateComponent
         FontScale=FNS_Small
         Hint="Only display standard servers (no mutators) in the server browser.  This option overrides filter settings."
         WinTop=0.093073
         WinLeft=0.020000
         WinWidth=0.243945
         WinHeight=0.308203
         TabOrder=5
         bBoundToParent=True
         bScaleToParent=True
         bStandardized=False
     End Object
     ch_Standard=moCheckBox'GUI2K4.UT2k4Browser_Footer.OnlyStandardCheckBox'

     Begin Object Class=GUITitleBar Name=BrowserStatus
         bUseTextHeight=False
         Justification=TXTA_Right
         FontScale=FNS_Small
         WinTop=0.030495
         WinLeft=0.238945
         WinWidth=0.761055
         WinHeight=0.390234
         bBoundToParent=True
         bScaleToParent=True
     End Object
     t_StatusBar=GUITitleBar'GUI2K4.UT2k4Browser_Footer.BrowserStatus'

     Begin Object Class=GUIButton Name=BrowserJoin
         Caption="JOIN"
         MenuState=MSAT_Disabled
         StyleName="FooterButton"
         WinTop=0.085678
         WinLeft=611.000000
         WinWidth=124.000000
         WinHeight=0.036482
         RenderWeight=2.000000
         TabOrder=2
         bBoundToParent=True
         OnClick=UT2k4Browser_Footer.InternalOnClick
         OnKeyEvent=BrowserJoin.InternalOnKeyEvent
     End Object
     b_Join=GUIButton'GUI2K4.UT2k4Browser_Footer.BrowserJoin'

     Begin Object Class=GUIButton Name=BrowserSpec
         Caption="SPECTATE"
         MenuState=MSAT_Disabled
         StyleName="FooterButton"
         WinTop=0.085678
         WinLeft=0.771094
         WinWidth=0.114648
         WinHeight=0.036482
         RenderWeight=2.000000
         TabOrder=1
         bBoundToParent=True
         OnClick=UT2k4Browser_Footer.InternalOnClick
         OnKeyEvent=BrowserSpec.InternalOnKeyEvent
     End Object
     b_Spectate=GUIButton'GUI2K4.UT2k4Browser_Footer.BrowserSpec'

     Begin Object Class=GUIButton Name=BrowserBack
         Caption="BACK"
         StyleName="FooterButton"
         Hint="Return to the previous menu"
         WinTop=0.085678
         WinHeight=0.036482
         RenderWeight=2.000000
         TabOrder=4
         bBoundToParent=True
         OnClick=UT2k4Browser_Footer.InternalOnClick
         OnKeyEvent=BrowserBack.InternalOnKeyEvent
     End Object
     b_Back=GUIButton'GUI2K4.UT2k4Browser_Footer.BrowserBack'

     Begin Object Class=GUIButton Name=BrowserRefresh
         Caption="REFRESH"
         MenuState=MSAT_Disabled
         StyleName="FooterButton"
         WinTop=0.085678
         WinLeft=0.885352
         WinWidth=0.114648
         WinHeight=0.036482
         RenderWeight=2.000000
         TabOrder=3
         bBoundToParent=True
         OnClick=UT2k4Browser_Footer.InternalOnClick
         OnKeyEvent=BrowserRefresh.InternalOnKeyEvent
     End Object
     b_Refresh=GUIButton'GUI2K4.UT2k4Browser_Footer.BrowserRefresh'

     Begin Object Class=GUIButton Name=BrowserFilter
         Caption="FILTERS"
         bAutoSize=True
         StyleName="FooterButton"
         Hint="Filters allow more control over which servers will appear in the server browser lists."
         WinTop=0.036482
         WinHeight=0.036482
         RenderWeight=2.000000
         TabOrder=0
         bBoundToParent=True
         OnClick=UT2k4Browser_Footer.InternalOnClick
         OnKeyEvent=BrowserFilter.InternalOnKeyEvent
     End Object
     b_Filter=GUIButton'GUI2K4.UT2k4Browser_Footer.BrowserFilter'

     ButtonHeight=0.040000
     bFullHeight=False
     Justification=TXTA_Right
     WinTop=0.936927
     WinHeight=0.062422
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Tue 24/10/2006 17:13:12.000 - Creation time: Wed 7/2/2007 19:16:55.718 - Created with UnCodeX