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 |
//============================================================================== // Login & Midgame menu - appears when player joins a server for the first time in a while and also on Esc press // Has tabs for seeing server rules & map rotation, team scores, and game controls // // Created by Matt Oelfke // (c) 2003, Epic Games, Inc. All Rights Reserved //============================================================================== class UT2K4PlayerLoginMenu extends FloatingWindow; var(MidGame) array<GUITabItem> Panels; var(MidGame) GUITabItem SPRulesPanel; var(MidGame) GUITabItem IARulesPanel; var(MidGame) automated GUITabControl c_Main; function InitComponent(GUIController MyController, GUIComponent MyComponent) { local PlayerController PC; Super.InitComponent(MyController, MyComponent); // rjp -- when playing SinglePlayer or InstantAction game, remove tabs which only apply to multiplayer PC = PlayerOwner(); if ( PC != None && PC.Level.NetMode == NM_StandAlone ) RemoveMultiplayerTabs(PC.Level.Game); // -- rjp if ( Panels.Length > 0 ) AddPanels(); SetTitle(); T_WindowTitle.DockedTabs = c_Main; } function bool FloatingPreDraw( Canvas C ) { if (PlayerOwner().GameReplicationInfo!=None) SetVisibility(true); else SetVisibility(false); return false; } function InternalOnClose(optional Bool bCanceled) { local PlayerController PC; PC = PlayerOwner(); // Turn pause off if currently paused if(PC != None && PC.Level.Pauser != None) PC.SetPause(false); Super.OnClose(bCanceled); } function AddPanels() { local int i; local MidGamePanel Panel; for ( i = 0; i < Panels.Length; i++ ) { Panel = MidGamePanel(c_Main.AddTabItem(Panels[i])); if ( Panel != None ) Panel.ModifiedChatRestriction = UpdateChatRestriction; } } // Called via delegate by a MidGamePanel when a player chat restriction has been updated // this notifies all other panels about the change function UpdateChatRestriction( MidGamePanel Sender, int PlayerID ) { local int i; if ( Sender == None ) return; for ( i = 0; i < c_Main.TabStack.Length; i++ ) { if ( c_Main.TabStack[i] != None && MidGamePanel(c_Main.TabStack[i].MyPanel) != None && c_Main.TabStack[i].MyPanel != Sender ) MidGamePanel(c_Main.TabStack[i].MyPanel).UpdateChatRestriction(PlayerID); } } function SetTitle() { local PlayerController PC; PC = PlayerOwner(); if ( PC.Level.NetMode == NM_StandAlone || PC.GameReplicationInfo == None || PC.GameReplicationInfo.ServerName == "" ) WindowName = PC.Level.GetURLMap(); else WindowName = PC.GameReplicationInfo.ServerName; t_WindowTitle.SetCaption(WindowName); } function RemoveMultiplayerTabs(GameInfo Game) { if (Game.CurrentGameProfile != none) Panels[2] = SPRulesPanel; //there's no map rotation in a single player tournament Panels.Remove(3,1); Panels.Remove(1,1); } event bool NotifyLevelChange() { bPersistent = false; LevelChanged(); return true; } defaultproperties { Panels(0)=(ClassName="GUI2K4.UT2K4Tab_PlayerLoginControls",Caption="Game",Hint="Game Controls") Panels(1)=(ClassName="GUI2K4.UT2K4Tab_ServerMOTD",Caption="MOTD",Hint="Message of the Day") Panels(2)=(ClassName="GUI2K4.UT2K4Tab_MidGameRulesCombo",Caption="Server Info",Hint="Current map rotation and game settings") Panels(3)=(ClassName="GUI2K4.UT2K4Tab_MidGameVoiceChat",Caption="Communication",Hint="Manage communication with other players") Panels(4)=(ClassName="GUI2K4.UT2K4Tab_MidGameHelp",Caption="Help",Hint="Helpful hints") SPRulesPanel=(ClassName="GUI2K4.UT2K4Tab_ServerInfo",Caption="Rules",Hint="Game settings") Begin Object Class=GUITabControl Name=LoginMenuTC bFillSpace=Wahr bDockPanels=Wahr TabHeight=0.037500 BackgroundStyleName="TabBackground" WinTop=0.060215 WinLeft=0.012500 WinWidth=0.974999 WinHeight=0.044644 bScaleToParent=Wahr bAcceptsInput=Wahr OnActivate=LoginMenuTC.InternalOnActivate End Object c_Main=GUITabControl'GUI2K4.UT2K4PlayerLoginMenu.LoginMenuTC' bResizeWidthAllowed=Falsch bResizeHeightAllowed=Falsch bMoveAllowed=Falsch DefaultLeft=0.110313 DefaultTop=0.057916 DefaultWidth=0.779688 DefaultHeight=0.847083 bRequire640x480=Wahr bPersistent=Wahr bAllowedAsLast=Wahr OnClose=UT2K4PlayerLoginMenu.InternalOnClose WinTop=0.057916 WinLeft=0.110313 WinWidth=0.779688 WinHeight=0.847083 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |