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 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 |
//==================================================================== // xVoting.MapInfoPage // Map Information Page // // Written by Bruce Bickar // (c) 2003, Epic Games, Inc. All Rights Reserved // ==================================================================== class MapInfoPage extends LockedFloatingWindow; var automated GUISectionBackground sb_Info; var automated GUIScrollTextBox lb_MapDesc; var automated GUIImage i_MapImage; var automated GUILabel l_MapAuthor, l_MapPlayers, l_NoPreview; var array<CacheManager.MapRecord> Maps; var localized string MessageNoInfo, AuthorText, PlayerText, lmsgLevelPreviewUnavailable; //------------------------------------------------------------------------------------------------ function InitComponent(GUIController MyController, GUIComponent MyOwner) { Super.Initcomponent(MyController, MyOwner); b_Cancel.SetVisibility(false); sb_Main.SetPosition(0.042302,0.043286,0.917083,0.451979); sb_Main.bBoundToParent=true; sb_Main.bScaletoParent=true; sb_Main.ManageComponent(i_MapImage); sb_Info.Managecomponent(lb_MapDesc); sb_Info.bBoundToParent=true; sb_Info.bScaletoParent=true; class'CacheManager'.static.GetMapList( Maps ); } //------------------------------------------------------------------------------------------------ function HandleParameters(string Param1, string Param2) { ReadMapInfo(Param1); } //------------------------------------------------------------------------------------------------ function ReadMapInfo(string MapName) { local DecoText DText; local string mDesc; local int Index, i; local Material Screenie; local string Package, Item; if(MapName == "") return; if (!Controller.bCurMenuInitialized) return; MapName = StripMapName(MapName); Index = FindCacheRecordIndex(MapName); if (Maps[Index].FriendlyName != "") sb_Main.Caption = Maps[Index].FriendlyName; else sb_Main.Caption = MapName; if ( Maps[Index].ScreenshotRef != "" ) Screenie = Material(DynamicLoadObject(Maps[Index].ScreenshotRef, class'Material')); i_MapImage.Image = Screenie; l_NoPreview.SetVisibility( Screenie == None ); i_MapImage.SetVisibility( Screenie != None ); l_MapPlayers.Caption = Maps[Index].PlayerCountMin@"-"@Maps[Index].PlayerCountMax@PlayerText; if ( class'CacheManager'.static.Is2003Content(Maps[Index].MapName) ) { if ( Maps[i].TextName != "" ) { if ( !Divide(Maps[Index].TextName, ".", Package, Item) ) { Package = "XMaps"; Item = Maps[Index].TextName; } DText = class'xUtil'.static.LoadDecoText( Package, Item ); } } if (DText != None) { for (i = 0; i < DText.Rows.Length; i++) { if (mDesc != "") mDesc $= "|"; mDesc $= DText.Rows[i]; } } else mDesc = Maps[Index].Description; if (mDesc == "") mDesc = MessageNoInfo; lb_MapDesc.SetContent( mDesc ); if (Maps[Index].Author != "") l_MapAuthor.Caption = AuthorText$":"@Maps[Index].Author; else l_MapAuthor.Caption = ""; } //------------------------------------------------------------------------------------------------ // Remove any additional text from the map's name // Used for getting just the mapname function string StripMapName( string FullMapName ) { local int pos; pos = InStr(FullMapName, " "); if ( pos != -1 ) FullMapName = Left(FullMapName, pos); return FullMapName; } //------------------------------------------------------------------------------------------------ function int FindCacheRecordIndex(string MapName) { local int i; for (i = 0; i < Maps.Length; i++) if (Maps[i].MapName == MapName) return i; return -1; } //------------------------------------------------------------------------------------------------ function bool ReturnButtonOnClick(GUIComponent Sender) { Controller.CloseMenu(true); return true; } //------------------------------------------------------------------------------------------------ function SetVisibility(bool bIsVisible) { Super.SetVisibility(bIsVisible); l_NoPreview.SetVisibility( i_MapImage.Image == None ); i_MapImage.SetVisibility( i_MapImage.Image != None ); } defaultproperties { Begin Object Class=GUISectionBackground Name=sbInfo bFillClient=Wahr WinTop=0.514698 WinLeft=0.045305 WinWidth=0.918322 WinHeight=0.374167 OnPreDraw=sbInfo.InternalPreDraw End Object sb_Info=GUISectionBackground'xVoting.MapInfoPage.sbInfo' Begin Object Class=GUIScrollTextBox Name=MapInfoList CharDelay=0.002500 EOLDelay=0.500000 bVisibleWhenEmpty=Wahr OnCreateComponent=MapInfoList.InternalOnCreateComponent WinTop=0.620235 WinLeft=0.284888 WinWidth=0.918322 WinHeight=0.207500 bTabStop=Falsch bScaleToParent=Wahr bNeverFocus=Wahr End Object lb_MapDesc=GUIScrollTextBox'xVoting.MapInfoPage.MapInfoList' Begin Object Class=GUIImage Name=MapImage ImageStyle=ISTY_Scaled ImageRenderStyle=MSTY_Normal WinTop=0.173177 WinLeft=0.281885 WinWidth=0.917083 WinHeight=0.451979 RenderWeight=0.200000 bScaleToParent=Wahr End Object i_MapImage=GUIImage'xVoting.MapInfoPage.MapImage' Begin Object Class=GUILabel Name=MapAuthorLabel Caption="MapAuthor" TextAlign=TXTA_Center TextColor=(B=255,G=255,R=255) TextFont="UT2ServerListFont" WinTop=0.366257 WinLeft=0.042804 WinWidth=0.915313 WinHeight=0.049359 RenderWeight=0.300000 bScaleToParent=Wahr End Object l_MapAuthor=GUILabel'xVoting.MapInfoPage.MapAuthorLabel' Begin Object Class=GUILabel Name=MapPlayersLabel Caption="Players" TextAlign=TXTA_Center TextColor=(B=255,G=255,R=255) TextFont="UT2ServerListFont" WinTop=0.397652 WinLeft=0.042804 WinWidth=0.915313 WinHeight=0.049359 RenderWeight=0.300000 bScaleToParent=Wahr End Object l_MapPlayers=GUILabel'xVoting.MapInfoPage.MapPlayersLabel' Begin Object Class=GUILabel Name=NoPreview Caption="No Preview Available" TextAlign=TXTA_Center TextColor=(B=0,G=255,R=247) TextFont="UT2HeaderFont" bTransparent=Falsch bMultiLine=Wahr VertAlign=TXTA_Center WinTop=0.173177 WinLeft=0.281885 WinWidth=0.917083 WinHeight=0.451979 bScaleToParent=Wahr End Object l_NoPreview=GUILabel'xVoting.MapInfoPage.NoPreview' MessageNoInfo="No information available!" AuthorText="Author" PlayerText="players" lmsgLevelPreviewUnavailable="Level Preview Unavailable" DefaultLeft=0.264063 DefaultTop=0.077213 DefaultWidth=0.468750 DefaultHeight=0.801954 bAllowedAsLast=Wahr WinTop=0.077213 WinLeft=0.264063 WinWidth=0.468750 WinHeight=0.801954 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |