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 |
class TribesGamespyTeamCreate extends TribesGamespyTeamLogin; var(TribesGui) private EditInline Config GUIEditBox EditTeamName; var(TribesGui) private EditInline Config GUIEditBox EditConfirm; function InternalOnShow() { ActionButton.SetEnabled(true); EditTeamTag.SetText(""); EditPassword.SetText(""); EditConfirm.SetText(""); SetupGamespyVars(); } protected function bool Validate() { if (!Super.Validate()) return false; if (EditPassword.GetText() != EditConfirm.GetText()) { OpenDlg(PasswordMismatchText, QBTN_Ok); return false; } return true; } protected function OnPerformGamespyAction() { GamespyCreateAccount(); } private function GamespyCreateAccount() { local PlayerProfile p; p = TribesGUIController(Controller).profileManager.GetActiveProfile(); gm.OnProfileAuthError = OnGamespyProfileAuthError; gm.OnTeamTagTaken = OnGamespyTeamTagTaken; gm.OnTeamRegistrationError = OnGamespyTeamRegistrationError; gm.OnTeamCreated = OnGamespyTeamCreated; // TODO: if p.statTrackingPassword is "" need to prompt user for password Log("Nick: " $ p.statTrackingNick); Log("Email: " $ p.statTrackingEmail); Log("TeamTag: " $ EditTeamTag.GetText()); Log("TeamName: " $ EditTeamName.GetText()); gm.CreateTeam(p.statTrackingNick, p.statTrackingEmail, p.statTrackingPassword, EditTeamTag.GetText(), EditTeamName.GetText(), EditPassword.GetText()); SetTimer(ActionTimeout, false); } private function OnGamespyProfileAuthError() { SetTimer(0, false); OpenDlg(BadParamText, QBTN_Ok); } private function OnGamespyTeamTagTaken() { SetTimer(0, false); OpenDlg(GamespyTeamTagTakenText, QBTN_Ok); } private function OnGamespyTeamRegistrationError() { SetTimer(0, false); OpenDlg(RegistrationError, QBTN_Ok); } private function OnGamespyTeamCreated() { local PlayerProfile p; p = TribesGUIController(Controller).profileManager.GetActiveProfile(); SetTimer(0, false); p.ownedTeamTag = EditTeamTag.GetText(); p.ownedTeamName = EditTeamName.GetText(); OpenDlg(GamespyCreateSuccessText, QBTN_Ok, "success"); } defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |