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 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 |
// ==================================================================== // (C) 2002, Epic Games // ==================================================================== class UT2K4UserMods extends ModsAndDemosTabs; var automated GUISectionBackground sb_1, sb_2, sb_3; var automated GUIListBox lb_ModList; var automated GUIScrollTextBox lb_ModInfo; var automated GUIImage i_ModLogo; var localized string NoModsListText; var localized string NoModsInfoText; var array<class> ModClasses; var bool bInitialized; function InitComponent(GUIController MyController, GUIComponent MyOwner) { Super.Initcomponent(MyController, MyOwner); lb_ModList.List.Clear(); LoadUserMods(); bInitialized = true; ModListChange(none); sb_1.ManageComponent(lb_ModList); sb_2.Managecomponent(lb_ModInfo); sb_3.Managecomponent(i_ModLogo); MyPage.MyFooter.b_Activate.OnClick=LaunchClick; MyPage.MyFooter.b_Web.OnClick=WebClick; lb_ModInfo.MyScrollText.bClickText=true; lb_ModInfo.MyScrollText.OnDblClick=LaunchURL; } function bool LaunchURL(GUIComponent Sender) { local string ClickString; ClickString = StripColorCodes(lb_ModInfo.MyScrollText.ClickedString); Controller.LaunchURL(ClickString); return true; } function LoadUserMods() { local array<string> ModDirs, ModTitles; local int i; GetModList(ModDirs, ModTitles); for (i=0;i<ModDirs.Length;i++) lb_ModList.List.Add(ModTitles[i],,ModDirs[i]); } function ModListChange(GUIComponent Sender) { local Material M; lb_ModInfo.SetContent( GetModValue( lb_ModList.List.GetExtra(),"ModDesc" )); M = GetModLogo( lb_ModList.List.GetExtra() ); if (!bInitialized) return; if (m!=none) { i_ModLogo.Image = M; i_ModLogo.SetVisibility(true); sb_2.WinTop = 0.300253; sb_2.WinHeight = 0.676279; sb_3.bVisible=true; lb_ModInfo.WinHeight=0.476758; lb_ModInfo.WinTop=0.376652; } else { sb_2.WinTop = 0.012761; sb_2.WinHeight = 0.965263; sb_3.bVisible=false; i_ModLogo.SetVisibility(false); lb_ModInfo.WinHeight=0.750196; lb_ModInfo.WinTop=0.103215; } } function bool LaunchClick(GUIComponent Sender) { local string CmdLine; if (lb_ModList.List.Index<0) return true; CmdLine = GetModValue( lb_ModList.List.GetExtra(), "ModCmdLine" ); if (CmdLine!="") Console(Controller.Master.Console).DelayedConsoleCommand("relaunch"@CmdLine@"-mod="$lb_ModList.List.GetExtra()@"-newwindow"); else Console(Controller.Master.Console).DelayedConsoleCommand("relaunch -mod="$lb_ModList.List.GetExtra()@"-newwindow"); return true; } function bool WebClick(GUIComponent Sender) { local string url; if (lb_ModList.List.Index<0) return true; url = GetModValue( lb_ModList.List.GetExtra(),"ModURL" ); Console(Controller.Master.Console).DelayedConsoleCommand("open"@url); return true; } defaultproperties { Begin Object Class=GUISectionBackground Name=sb1 bFillClient=Wahr Caption="Mods" BottomPadding=0.200000 WinTop=0.012761 WinLeft=0.012527 WinWidth=0.408084 WinHeight=0.960281 RenderWeight=0.010000 OnPreDraw=sb1.InternalPreDraw End Object sb_1=GUISectionBackground'GUI2K4.UT2K4UserMods.sb1' Begin Object Class=AltSectionBackground Name=sb2 bFillClient=Wahr Caption="Description" WinTop=0.012761 WinLeft=0.431054 WinWidth=0.562541 WinHeight=0.965263 RenderWeight=0.010000 OnPreDraw=sb2.InternalPreDraw End Object sb_2=AltSectionBackground'GUI2K4.UT2K4UserMods.sb2' Begin Object Class=AltSectionBackground Name=sb3 bFillClient=Wahr WinTop=0.012761 WinLeft=0.431054 WinWidth=0.562541 WinHeight=0.277682 RenderWeight=0.010000 OnPreDraw=sb3.InternalPreDraw End Object sb_3=AltSectionBackground'GUI2K4.UT2K4UserMods.sb3' Begin Object Class=GUIListBox Name=lbModList bVisibleWhenEmpty=Wahr OnCreateComponent=lbModList.InternalOnCreateComponent WinTop=0.102865 WinLeft=0.030468 WinWidth=0.333985 WinHeight=0.749024 TabOrder=0 OnChange=UT2K4UserMods.ModListChange End Object lb_ModList=GUIListBox'GUI2K4.UT2K4UserMods.lbModList' Begin Object Class=GUIScrollTextBox Name=lbModInfo bNoTeletype=Wahr bVisibleWhenEmpty=Wahr OnCreateComponent=lbModInfo.InternalOnCreateComponent WinTop=0.103215 WinLeft=0.378906 WinWidth=0.582032 WinHeight=0.750196 TabOrder=1 End Object lb_ModInfo=GUIScrollTextBox'GUI2K4.UT2K4UserMods.lbModInfo' Begin Object Class=GUIImage Name=iLogo Image=Texture'2K4Menus.Content.modmenulogo' DropShadow=Texture'2K4Menus.Controls.Shadow' ImageStyle=ISTY_Scaled ImageRenderStyle=MSTY_Normal WinTop=0.102865 WinLeft=0.377930 WinWidth=0.583008 WinHeight=0.255859 RenderWeight=0.400000 bVisible=Falsch End Object i_ModLogo=GUIImage'GUI2K4.UT2K4UserMods.iLogo' NoModsListText="No Mods Installed" NoModsInfoText="There are currently no mods or TC installed in this copy of UT2004. Add message pimping cool places to get them here" PropagateVisibility=Falsch Tag=1 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |