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

KFGui.KFUT2K4Tab_ServerRulesPanel


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
//-----------------------------------------------------------
//
//-----------------------------------------------------------
class KFUT2K4Tab_ServerRulesPanel extends UT2K4Tab_ServerRulesPanel;

var automated GUISectionBackground sb_background;

function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
	super(IAMultiColumnRulesPanel).InitComponent(MyController, MyOwner);

	RemoveComponent(b_Symbols);

    sb_background.ManageComponent(lb_Rules);
    sb_background.ManageComponent(nu_Port);
    sb_background.ManageComponent(ch_Webadmin);
    sb_background.ManageComponent(ch_LANServer);
    sb_background.ManageComponent(ch_Advanced);
}

protected function bool ShouldDisplayRule(int Index)
{
	if ( GamePI.Settings[Index].bAdvanced && !Controller.bExpertMode )
		return false;

    // Only multiplayer-specific setting on this page
    return GamePI.Settings[Index].bMPOnly;
}

function Refresh()
{
    Super.Refresh();

    sb_background.ManageComponent(lb_Rules);
}

function InternalOnChange(GUIComponent Sender)
{
    if (Sender == ch_Advanced)
    {
    	// Save our preference
        Controller.bExpertMode = ch_Advanced.IsChecked();
        Controller.SaveConfig();

		// Reload the playinfo settings and repopulate the MultiOptionList
        p_Anchor.SetRuleInfo();

        //reload maplist
        p_Anchor.p_Main.InitMaps();

        return;
    }
    else
    {
    	super.InternalOnChange(Sender);
    }
}

defaultproperties
{
     Begin Object Class=ROGUIProportionalContainer Name=myBackgroundGroup
         bNoCaption=True
         WinHeight=1.000000
         OnPreDraw=myBackgroundGroup.InternalPreDraw
     End Object
     sb_Background=ROGUIProportionalContainer'KFGui.KFUT2K4Tab_ServerRulesPanel.myBackgroundGroup'

     Begin Object Class=moCheckBox Name=EnableWebadmin
         Caption="Enable WebAdmin"
         OnCreateComponent=EnableWebadmin.InternalOnCreateComponent
         IniOption="@Internal"
         Hint="Enables remote web-based administration of the server"
         WinTop=0.900000
         WinLeft=0.550000
         WinWidth=0.400000
         WinHeight=0.040000
         TabOrder=4
         OnChange=KFUT2K4Tab_ServerRulesPanel.Change
         OnLoadINI=KFUT2K4Tab_ServerRulesPanel.InternalOnLoadINI
     End Object
     ch_Webadmin=moCheckBox'KFGui.KFUT2K4Tab_ServerRulesPanel.EnableWebadmin'

     Begin Object Class=moCheckBox Name=LANServer
         Caption="LAN Server"
         OnCreateComponent=LANServer.InternalOnCreateComponent
         IniOption="@Internal"
         Hint="Optimizes various engine and network settings for LAN-based play.  Enabling this option when running an internet server will cause EXTREME lag during the match!"
         WinTop=0.950000
         WinLeft=0.050000
         WinWidth=0.400000
         WinHeight=0.040000
         TabOrder=3
         OnChange=KFUT2K4Tab_ServerRulesPanel.Change
         OnLoadINI=KFUT2K4Tab_ServerRulesPanel.InternalOnLoadINI
     End Object
     ch_LANServer=moCheckBox'KFGui.KFUT2K4Tab_ServerRulesPanel.LANServer'

     Begin Object Class=moNumericEdit Name=WebadminPort
         MinValue=1
         MaxValue=65536
         CaptionWidth=0.700000
         ComponentWidth=0.300000
         Caption="WebAdmin Port"
         OnCreateComponent=WebadminPort.InternalOnCreateComponent
         IniOption="@Internal"
         Hint="Select which port should be used to connect to the remote web-based administration"
         WinTop=0.950000
         WinLeft=0.550000
         WinWidth=0.400000
         WinHeight=0.040000
         TabOrder=5
         OnChange=KFUT2K4Tab_ServerRulesPanel.Change
         OnLoadINI=KFUT2K4Tab_ServerRulesPanel.InternalOnLoadINI
     End Object
     nu_Port=moNumericEdit'KFGui.KFUT2K4Tab_ServerRulesPanel.WebadminPort'

     Begin Object Class=moCheckBox Name=AdvancedButton
         Caption="View Advanced Options"
         OnCreateComponent=AdvancedButton.InternalOnCreateComponent
         Hint="Toggles whether advanced properties are displayed"
         WinTop=0.900000
         WinLeft=0.050000
         WinWidth=0.400000
         WinHeight=0.040000
         RenderWeight=1.000000
         TabOrder=1
         bBoundToParent=True
         bScaleToParent=True
         OnChange=KFUT2K4Tab_ServerRulesPanel.InternalOnChange
     End Object
     ch_Advanced=moCheckBox'KFGui.KFUT2K4Tab_ServerRulesPanel.AdvancedButton'

     i_bk=None

     Begin Object Class=GUIMultiOptionListBox Name=RuleListBox
         bVisibleWhenEmpty=True
         OnCreateComponent=KFUT2K4Tab_ServerRulesPanel.ListBoxCreateComponent
         WinHeight=0.850000
         TabOrder=0
         bBoundToParent=True
         bScaleToParent=True
         OnChange=KFUT2K4Tab_ServerRulesPanel.InternalOnChange
     End Object
     lb_Rules=GUIMultiOptionListBox'KFGui.KFUT2K4Tab_ServerRulesPanel.RuleListBox'

}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fri 13-10-2023 03:17:26.000 - Creation time: Fri 13-10-2023 03:19:04.367 - Created with UnCodeX