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 |
//============================================================================== // Tournament details // // Written by Michiel Hendriks // (c) 2003, Epic Games, Inc. All Rights Reserved //============================================================================== class UT2K4SP_Details extends UT2K4MainPage config; var automated GUIButton btnClose, btnExport; var automated moCheckBox cbAlwaysShow; var localized string PageCaption, ProfileExported; /** profile exporter to use */ var globalconfig string ProfileExporter; var UT2K4GameProfile GP; function InitComponent(GUIController MyController, GUIComponent MyOwner) { local UT2K4SPTab_DetailEnemies detab; Super.Initcomponent(MyController, MyOwner); GP = UT2K4GameProfile(PlayerOwner().Level.Game.CurrentGameProfile); t_Header.SetCaption(PageCaption); c_Tabs.AddTab(PanelCaption[0], PanelClass[0], , PanelHint[0], true); // last match if (GP.PhantomMatches.length > 0) c_Tabs.AddTab(PanelCaption[2], PanelClass[2], , PanelHint[2], false); // phantom detab = UT2K4SPTab_DetailEnemies(c_Tabs.AddTab(PanelCaption[1], PanelClass[1], , PanelHint[1], false)); // enemies if (detab.TeamStats.length == 0) c_Tabs.RemoveTab(, detab.MyButton); cbAlwaysShow.Checked(GP.bShowDetails); } function bool InternalOnPreDraw(Canvas Canvas) { local float XL,YL; btnExport.Style.TextSize(Canvas, btnExport.MenuState, btnExport.Caption, XL, YL, btnExport.FontScale); // Automatically size the buttons based on the size of their captions btnClose.WinWidth = XL+32; btnClose.WinLeft = Canvas.ClipX-btnClose.WinWidth; btnExport.WinWidth = XL+32; btnExport.WinLeft = btnClose.WinLeft-btnExport.WinWidth; return false; } function bool btnCloseOnClick(GUIComponent Sender) { return Controller.CloseMenu(true); } /** Clicked a TabButton */ function InternalOnChange(GUIComponent Sender) { if (GUITabButton(Sender)==none) return; t_Header.SetCaption(PageCaption@"|"@GUITabButton(Sender).Caption); } function cbAlwaysShowOnChange(GUIComponent Sender) { GP.bShowDetails = cbAlwaysShow.IsChecked(); return; } function bool btnExportOnClick(GUIComponent Sender) { local GUIQuestionPage QPage; local class<SPProfileExporter> expclass; local SPProfileExporter exporter; expclass = class<SPProfileExporter>(DynamicLoadObject(ProfileExporter, class'Class')); if (expclass == none) { Warn("Invalid profile exporter:"@ProfileExporter); return true; } exporter = new expclass; exporter.Create(GP, PlayerOwner().Level); exporter.ExportProfile(); if (Controller.OpenMenu(Controller.QuestionMenuClass)) { QPage=GUIQuestionPage(Controller.TopPage()); QPage.SetupQuestion(QPage.Replace(ProfileExported, "%filename%", exporter.ResultFile), QBTN_Ok); } return true; } function OnDetailClose(optional bool bCanceled) { local UT2K4SP_Main main; main = UT2K4SP_Main(Controller.FindMenuByClass(class'UT2K4SP_Main')); // main = UT2K4SP_Main(Controller.MenuStack[Controller.MenuStack.length-2]); if (main != none) { if (main.c_Tabs.PendingTab == none) main.c_Tabs.ActiveTab.MyPanel.ShowPanel(true); } } defaultproperties { Begin Object Class=GUIButton Name=SPDbtnClose Caption="CLOSE" StyleName="FooterButton" Hint="Return to the ladder" WinTop=0.959479 WinWidth=0.120000 WinHeight=0.040703 RenderWeight=1.000000 TabOrder=0 bBoundToParent=Wahr OnClick=UT2K4SP_Details.btnCloseOnClick OnKeyEvent=SPDbtnClose.InternalOnKeyEvent End Object btnClose=GUIButton'GUI2K4.UT2K4SP_Details.SPDbtnClose' Begin Object Class=GUIButton Name=SPDbtnExport Caption="EXPORT" StyleName="FooterButton" Hint="Export the details to a file" WinTop=0.959479 WinLeft=0.880000 WinWidth=0.120000 WinHeight=0.040703 RenderWeight=1.000000 TabOrder=1 bBoundToParent=Wahr OnClick=UT2K4SP_Details.btnExportOnClick OnKeyEvent=SPDbtnExport.InternalOnKeyEvent End Object btnExport=GUIButton'GUI2K4.UT2K4SP_Details.SPDbtnExport' Begin Object Class=moCheckBox Name=SPDcbAlwaysShow Caption="Show after a match" OnCreateComponent=SPDcbAlwaysShow.InternalOnCreateComponent WinTop=0.966146 WinLeft=0.006250 WinWidth=0.289063 RenderWeight=1.000000 TabOrder=2 OnChange=UT2K4SP_Details.cbAlwaysShowOnChange End Object cbAlwaysShow=moCheckBox'GUI2K4.UT2K4SP_Details.SPDcbAlwaysShow' PageCaption="Tournament details" ProfileExported="Profile details exported to:|%filename%" ProfileExporter="GUI2K4.SPProfileExporter" Begin Object Class=GUIHeader Name=SPDhdrHeader RenderWeight=0.300000 End Object t_Header=GUIHeader'GUI2K4.UT2K4SP_Details.SPDhdrHeader' Begin Object Class=ButtonFooter Name=SPDftrFooter RenderWeight=0.300000 OnPreDraw=SPDftrFooter.InternalOnPreDraw End Object t_Footer=ButtonFooter'GUI2K4.UT2K4SP_Details.SPDftrFooter' PanelClass(0)="GUI2K4.UT2K4SPTab_DetailMatch" PanelClass(1)="GUI2K4.UT2K4SPTab_DetailEnemies" PanelClass(2)="GUI2K4.UT2K4SPTab_DetailPhantom" PanelCaption(0)="Last Match Played" PanelCaption(1)="Opponent Teams" PanelCaption(2)="Other Tournament Matches" PanelHint(0)="Overview of the last match played" PanelHint(1)="Overview of the teams you've played against" PanelHint(2)="Overview of matches played by other teams" bPersistent=Falsch OnClose=UT2K4SP_Details.OnDetailClose bDrawFocusedLast=Falsch OnPreDraw=UT2K4SP_Details.InternalOnPreDraw } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |