Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 |
class KFGamePageSP extends UT2K4GamePageSP; // Helper for Hack fix for selecting GameType tab var bool bFirstChangeCompleted; function InitComponent(GUIController MyController, GUIComponent MyOwner) { super(UT2K4MainPage).Initcomponent(MyController, MyOwner); RuleInfo = new(None) class'Engine.PlayInfo'; p_Game = UT2K4Tab_GameTypeBase(c_Tabs.AddTab(PanelCaption[0],PanelClass[0],,PanelHint[0], true)); p_Game.OnChangeGameType = ChangeGameType; p_Main = UT2K4Tab_MainBase(c_Tabs.AddTab(PanelCaption[1],PanelClass[1],,PanelHint[1], true)); p_Game.tp_Main = p_Main; mcRules = KFIAMultiColumnRulesPanel(c_Tabs.AddTab(PanelCaption[2], "KFGUI.KFIAMultiColumnRulesPanel",, PanelHint[2], false)); p_Mutators = UT2K4Tab_MutatorBase(c_Tabs.AddTab(PanelCaption[3],PanelClass[3],,PanelHint[3], false)); b_Back = UT2K4GameFooter(t_Footer).b_Back; b_Secondary = UT2K4GameFooter(t_Footer).b_Secondary; b_Primary = UT2K4GameFooter(t_Footer).b_Primary; DisableComponent(b_Secondary); EnableComponent(b_Primary); // Disable the Sandbox Tab if we're not in Sandbox mode if ( class'KFGameType'.default.KFGameLength != 3 ) { c_Tabs.TabStack[2].DisableMe(); } } function InternalOnChange(GUIComponent Sender) { // HACK: Switch back to the GameType tab if we have more than 1 GameType available if ( !bFirstChangeCompleted ) { if ( p_Game.li_Games.Elements.Length > 0 ) { if ( p_Game.li_Games.Elements.Length > 1 ) { bFirstChangeCompleted = true; c_Tabs.ActivateTabByName(PanelCaption[0], True); } p_Game.li_Games.SetIndex(0); } } bFirstChangeCompleted = p_Game.li_Games.Elements.Length > 0; super.InternalOnChange(Sender); } function UpdateBotSetting( string NewValue, moNumericEdit BotControl ) { local GUITabButton BotTab; if ( BotControl == None || NewValue == "" ) { return; } BotTab = GetBotTab(); EnableComponent(BotControl); EnableComponent(BotTab); } function ChangeGameType(bool bIsCustom) { if ( GameTypeLocked() ) return; // We've changed the gametype, so the settings in PlayInfo may no longer be applicable // Re-initialize PlayInfo and refresh the applicable pages, then update the maplists // and bot configurations if ( p_Main != None ) { p_Main.InitGameType(); if ( p_Mutators != None ) p_Mutators.SetCurrentGame(p_Main.CurrentGameType); } SetRuleInfo(); KFMapPage(p_Main).RefreshOptions(); // We use the bIsCustom flag to denote whether or not we should move on to the Maps tab if ( bIsCustom ) { c_Tabs.ActivateTabByName(PanelCaption[1], True); } if ( p_BotConfig != none ) p_BotConfig.SetupBotLists(p_Main.GetIsTeamGame()); } // Forces the player to choose a gametype if none has been chosen - prevents having to load any gametypes until one is chosen, and speeds the page load function bool GameTypeLocked() { local int i; local GUITabButton tb; // Don't lock if we don't have a gametype tab (for whatever reason) if ( p_Game == None ) return false; if ( Controller.LastGameType == "" ) { for ( i = 0; i < c_Tabs.TabStack.Length; i++ ) { tb = c_Tabs.TabStack[i]; if ( tb != None && tb != p_Game.MyButton ) DisableComponent(tb); } DisableComponent(b_Primary); DisableComponent(b_Secondary); return true; } else { for ( i = 0; i < c_Tabs.TabStack.Length; i++ ) { tb = c_Tabs.TabStack[i]; if ( tb != None ) { if ( tb.MyPanel == p_Mutators && class'LevelInfo'.static.IsDemoBuild() ) DisableComponent(tb); else EnableComponent(tb); } } EnableComponent(b_Primary); DisableComponent(b_Secondary); // Update the botmode stuff (tab button & minplayers property control) if ( RuleInfo != None && mcRules != None ) { i = RuleInfo.FindIndex("BotMode"); if ( i != -1 ) mcRules.UpdateBotSetting(i); } } return false; } defaultproperties { PageCaption="Solo" t_Header=GUIHeader'GUI2K4.UT2k4ServerBrowser.ServerBrowserHeader' Begin Object Class=KFGameFooter Name=SPFooter PrimaryCaption="PLAY" PrimaryHint="Start A Match With These Settings" SecondaryCaption="SPECTATE" SecondaryHint="Spectate A Match With These Settings" Justification=TXTA_Center TextIndent=5 FontScale=FNS_Small RenderWeight=0.300000 TabOrder=8 OnPreDraw=SPFooter.InternalOnPreDraw End Object t_Footer=KFGameFooter'KFGui.KFGamePageSP.SPFooter' Begin Object Class=BackgroundImage Name=PageBackground Image=Texture'KillingFloor2HUD.Menu.menuBackground' ImageStyle=ISTY_Justified ImageAlign=IMGA_Center RenderWeight=0.010000 End Object i_Background=BackgroundImage'KFGui.KFGamePageSP.PageBackground' PanelClass(0)="KFGUI.KFTab_GameTypeSP" PanelClass(1)="KFGUI.KFMapPage" PanelClass(2)="KFGUI.KFRules" PanelClass(3)="KFGUI.KFMutatorPage" PanelCaption(0)="Select Gametype" PanelCaption(2)="Sandbox" PanelHint(0)="Select desired gametype" PanelHint(1)="Select maps and difficulty..." PanelHint(2)="Configure the current game..." } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |