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 |
class PlayInfo extends object native; cpptext { void ReturnFilteredSettings( TArray<FPlayInfoData>& PIData, const FString& GroupName ); UBOOL NeedsValidation( const UProperty* Prop ) const; UBOOL ValidateRange( const UProperty* Prop, FString& NewVal, FString& DataRange ) const; } enum EPlayInfoType { PIT_Check, PIT_Select, PIT_Text, PIT_Custom }; struct native init PlayInfoData { var const Property ThisProp; // Pointer to property var const class<Info> ClassFrom; // Which class was this Property from var const string SettingName; // Name of the class member var const string DisplayName; // Display Name of the control (from .INT/.INI File ?) var const string Description; // Description of what the property does var const string Grouping; // Grouping for this parameter var const string Data; // Extra Data (like Gore Level Texts) var const string ExtraPriv; // Extra Privileges Required to set this parameter var const string Value; // Value of the setting var const EPlayInfoType RenderType; // Type of rendered control var const byte SecLevel; // Sec Level Required to set this param. (Read from Ini file afterwards) var const byte Weight; // Importance of the setting compared to others in its group var const bool bMPOnly; // This setting should only appear in multi-player context var const bool bAdvanced; // This setting is an advanced property (only displayed when user sets bExpertMode in GUIController) // Internal flags (set natively) var const bool bGlobal; // globalconfig property var const bool bStruct; // Property is a struct var const int ArrayDim; // -1: Not array, 0: dynamic array, >1: Static array }; var const array<PlayInfoData> Settings; var const array<class<Info> > InfoClasses; var const array<int> ClassStack; var const array<string> Groups; var const string LastError; native(700) final function bool Clear(); native(701) final function bool AddClass(class<Info> AddingClass); native(702) final function bool RemoveClass(class<Info> RemovingClass); native(703) final function bool PopClass(); native(704) final function bool AddSetting(string Group, string PropertyName, string Description, byte SecLevel, byte Weight, string RenderType, optional string Extras, optional string ExtraPrivs, optional bool bMultiPlayerOnly, optional bool bAdvanced); native(705) final function bool SaveSettings(); // Saves stored settings to ini file native(706) final function bool StoreSetting(int index, coerce string NewVal, optional string RangeData); // Only validates and sets Settins[index].Value to passed value native(707) final function bool GetSettings(string GroupName, out array<PlayInfoData> GroupSettings); // rjp native(708) final function int FindIndex(string SettingName); // 0 = Grouping, 1 = Weight, 2 = RenderType, 3 = DisplayName, 4 = SettingName, 5 = SecLevel // 6 = RevGroup, 1 = RevWeight, etc. // Equal items will be sorted by the next highest type native(709) final function Sort(byte SortingMethod); final function Dump( optional string group ) { local int i; log("** Dumping settings array for PlayInfo object '"$Name$"' **"); log("** Classes:"@InfoClasses.Length); for ( i = 0; i < InfoClasses.Length; i++ ) log(" "$i$")"@InfoClasses[i].Name); log(""); log("** Groups:"@Groups.Length); for (i = 0; i < Groups.Length; i++) log(" "$i$")"@Groups[i]); log(""); Log("** Settings:"@Settings.Length); for (i = 0; i<Settings.Length; i++) { if ( group == "" || group ~= Settings[i].Grouping ) { Log(i$")"@Settings[i].SettingName); log(" DisplayName:"@Settings[i].DisplayName); log(" ClassFrom:"@Settings[i].ClassFrom); log(" Group:"@Settings[i].Grouping); log(" Value:"@Settings[i].Value); log(" Data:"@Settings[i].Data); log(" Weight:"@Settings[i].Weight); log(" Struct:"@Settings[i].bStruct); log(" Global:"@Settings[i].bGlobal); log(" MPOnly:"@Settings[i].bMPOnly); log(" SecLevel:"@Settings[i].SecLevel); log(" ArrayDim:"@Settings[i].ArrayDim); log(" bAdvanced:"@Settings[i].bAdvanced); log(" ExtraPriv:"@Settings[i].ExtraPriv); log(" RenderType:"@GetEnum(enum'EPlayInfoType',Settings[i].RenderType)); log(""); } } } // Specify bStrict to purge any secondary classes from the Classes stack final function bool Init(array<class<Info> > Classes, optional bool bStrict) { local int i, j; local bool b; if (Classes.Length == 0) return b; b = True; Clear(); for (i = 0; i < Classes.Length; i++) { if (Classes[i] == None) { log("Call in PlayInfo.Init() with 'None' value for Class array member. Index:"$i); Classes.Remove(i--, 1); continue; } Classes[i].static.FillPlayInfo(Self); } if ( bStrict ) { for ( i = InfoClasses.Length - 1; i >= 0; i-- ) { for (j = 0; j < Classes.Length; j++) if (InfoClasses[i] == Classes[j]) break; if (j < Classes.Length) continue; b = b && RemoveClass(InfoClasses[i]); } } return b; } final function class<GameInfo> GetGameInfo() { local int i; for ( i = 0; i < InfoClasses.Length; i++ ) if ( class<GameInfo>( InfoClasses[i] ) != None ) return class<GameInfo>(InfoClasses[i]); return None; } final function SplitStringToArray(out array<string> Parts, string Source, string Delim) { Split(Source, Delim, Parts); } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |