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 |
//============================================================================= // ModPageContent. Simple way for custom mods to add in their own variables. //============================================================================= class ModPageContent extends WebPageContent; var() string PageName; var bool bNoExtraInfo; Static function string LoadUpClassContent( SubWebManager Other, WebConnection Receiver ) { local string S; S = "<!-- Mod config ("$Default.Class$") --><form method=\"post\" action=\"Mod_"$Default.Class$"?"$Default.Class$"\">"$Other.NewLineChar; if( !Default.bNoExtraInfo ) S = S$"<h2>"$Default.PageName$"</h2><br><A href=\"/ModLinksPage\" target=\"menumain\">Return</A> to last page.<BR>"$Other.NewLineChar; AddModBasedString(S,Other,Receiver); S = S$"<p><CENTER><input class=\"button\" type=\"submit\" name=\"edit\" value=\"Submit\"></CENTER></form><!-- End of Mod config code-->"; Return S; } // Rate this! Static function AddModBasedString( out string S, SubWebManager Other, WebConnection Receiver ); // Called before doing any configure macros. Static function StartTable( out string S ) { S = S$"<CENTER><TABLE BORDER=0>"; } // Called after the configure macros. Static function EndTable( out string S ) { S = S$"</TABLE></CENTER>"; } // @ S - Current response string // @ InfoStr - Variable info // @ bIsChecked - Checkbox currently checked? // @ ResponseVar - Used for idetifying with responseline. Static function AddConfigCheckbox( out string S, string InfoStr, bool bIsChecked, string ResponseVar, optional bool bNotTable ) { local string Ch; if( bIsChecked ) Ch = " checked=\"checked\""; if( bNotTable ) S = S$InfoStr$":<input class=\"checkbox\" name=\""$ResponseVar$"\" value=\"0\""$Ch$" type=\"checkbox\">"$Chr(10); else S = S$"<TR><TD>"$InfoStr$":</TD><TD><input class=\"checkbox\" name=\""$ResponseVar$"\" value=\"0\""$Ch$" type=\"checkbox\"></TD></TR>"$Chr(10); } // @ S - Current response string // @ InfoStr - Variable info // @ CurVal - Current text value now. // @ MaxLen - Maximum length of the text. // @ ResponseVar - Used for idetifying with responseline. Static function AddConfigEditbox( out string S, string InfoStr, string CurVal, int MaxLen, string ResponseVar, optional bool bNotTable ) { if( bNotTable ) S = S$InfoStr$":<input class=\"textbox\" class=\"text\" name=\""$ResponseVar$"\" size=\""$Min(100,MaxLen)$"\" value=\""$CurVal$"\" maxlength=\""$MaxLen$"\">"$Chr(10); else S = S$"<TR><TD>"$InfoStr$":</TD><TD><input class=\"textbox\" class=\"text\" name=\""$ResponseVar$"\" size=\""$Min(100,MaxLen)$"\" value=\""$CurVal$"\" maxlength=\""$MaxLen$"\"></TD></TR>"$Chr(10); } Static function ProcessReceivedData( string Data, SubWebManager Other, WebConnection Receiver ) { local int i; local string S,Pr; While( Data!="" ) { i = InStr(Data,"&"); if( i==-1 ) { S = Data; Data = ""; } else { S = Left(Data,i); Data = Mid(Data,i+1); } i = InStr(S,"="); Pr = Left(S,i); S = Mid(S,i+1); S = Other.DataToStr(S); IncomingData(Pr,S,Other,Receiver); } DoneUpdate(Other,Receiver); } static function bool ParseNextStr( out string Data, out string VarD, out string ValD ) { local int i; if( Len(Data)==0 ) return false; i = InStr(Data,"&"); if( i==-1 ) { VarD = Data; Data = ""; } else { VarD = Left(Data,i); Data = Mid(Data,i+1); } i = InStr(VarD,"="); if( i==-1 ) return true; ValD = Class'SubWebManager'.Static.DataToStr(Mid(VarD,i+1)); VarD = Left(VarD,i); return true; } // Rate this (to update game values). Static function IncomingData( string ResponseVar, string RespVal, SubWebManager Other, WebConnection Receiver ); Static function DoneUpdate( SubWebManager Other, WebConnection Receiver ); defaultproperties { PageName="Mod page" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |