Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

ROInterface.ROSteamLoginPage


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
//=============================================================================
// ROSteamLoginPage
//=============================================================================
// Menu that pops up when attempting to connect to a server with an expired
// Steam login. This page allows the user to log back in without exiting
// to Steam.
//=============================================================================
// Red Orchestra Source
// Copyright (C) 2005 Tripwire Interactive - John Gibson
//=============================================================================
class ROSteamLoginPage extends UT2K4GetDataMenu;

var string	RetryURL;
var localized string IncorrectPassword;
var localized string SteamUserName;
var automated GUILabel  l_Text3, l_Text4;

var float WaitTime;
var int WaitCounter;

function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
	Super.InitComponent(Mycontroller, MyOwner);
	PlayerOwner().ClearProgressMessages();

	ed_Data.MyEditBox.bMaskText=true;
	ed_Data.MyEditBox.bConvertSpaces = true;

	l_Text4.Caption = Controller.SteamGetUserName();
}

function HandleParameters(string URL, string FailCode)
{
	RetryURL = URL;
}

function bool InternalOnClick(GUIComponent Sender)
{
	if ( Sender == b_OK  ) // Retry
		RetryPassword();

	else if ( Sender == b_Cancel ) // Fail
		Controller.ReplaceMenu(Controller.GetServerBrowserPage());

	return true;
}

function RetryPassword()
{
	local string 			EntryString;
	local ExtendedConsole	MyConsole;

	EntryString = ed_Data.GetText();
	MyConsole = ExtendedConsole(PlayerOwner().Player.Console);

	if( Controller.SteamRefreshLogin(EntryString) )
	{
		SetTimer( 0.25, true);

		ed_Data.DisableMe();
		b_OK.DisableMe();
		//b_Cancel.DisableMe();
		l_Text3.DisableMe();
		l_Text4.DisableMe();
		return;

		//Controller.ReplaceMenu(Controller.GetServerBrowserPage());
		//return;
		// Put this back in when Valve fixes the AuthValidation Stall problem
		//PlayerOwner().ClientTravel( RetryURL,TRAVEL_Absolute,false);
	}
	else
	{
		l_Text.Caption = IncorrectPassword;
		return;
	}

	Controller.CloseAll(false,True);
}

event Timer()
{
	super.Timer();

	if( WaitTime <= 5.0 )
	{
		WaitTime += 0.25;

		if( WaitCounter == 1 )
		{
			l_Text.Caption = "Refreshing Login  .    ";
			WaitCounter++;
		}
		else if ( WaitCounter == 2 )
		{
			l_Text.Caption = "Refreshing Login   .   ";
			WaitCounter++;
		}
		else if ( WaitCounter == 3 )
		{
			l_Text.Caption = "Refreshing Login    .  ";
			WaitCounter++;
		}
 		else if ( WaitCounter == 4 )
		{
			l_Text.Caption = "Refreshing Login     . ";
			WaitCounter++;
		}
		else if ( WaitCounter == 5 )
		{
			l_Text.Caption = "Refreshing Login      .";
			WaitCounter=0;
		}
		else
		{
			l_Text.Caption = "Refreshing Login .     ";
			WaitCounter++;
		}

		SetTimer( 0.25, true);
	}
	else
	{
		Controller.ReplaceMenu(Controller.GetServerBrowserPage());
	}

}

defaultproperties
{
     IncorrectPassword="Incorrect password specified.  Please try again."
     Begin Object Class=GUILabel Name=UserNameTagLabel
         Caption="Steam UserName:"
         StyleName="TextLabel"
         WinTop=0.440366
         WinLeft=0.209375
         WinWidth=0.562500
         WinHeight=0.030000
     End Object
     l_Text3=GUILabel'ROInterface.ROSteamLoginPage.UserNameTagLabel'

     Begin Object Class=GUILabel Name=SteamUserNameLabel
         StyleName="TextLabel"
         WinTop=0.438283
         WinLeft=0.435938
         WinWidth=0.562500
         WinHeight=0.030000
     End Object
     l_Text4=GUILabel'ROInterface.ROSteamLoginPage.SteamUserNameLabel'

     Begin Object Class=GUIButton Name=GetPassFail
         Caption="CANCEL"
         StyleName="SelectButton"
         WinTop=0.547122
         WinLeft=0.586523
         WinWidth=0.147500
         WinHeight=0.045000
         TabOrder=2
         bBoundToParent=True
         OnClick=ROSteamLoginPage.InternalOnClick
         OnKeyEvent=GetPassFail.InternalOnKeyEvent
     End Object
     b_Cancel=GUIButton'ROInterface.ROSteamLoginPage.GetPassFail'

     Begin Object Class=moEditBox Name=GetPassPW
         CaptionWidth=0.400000
         Caption="Steam Password"
         OnCreateComponent=GetPassPW.InternalOnCreateComponent
         WinTop=0.485366
         WinLeft=0.209375
         WinWidth=0.562500
         TabOrder=0
     End Object
     ed_Data=moEditBox'ROInterface.ROSteamLoginPage.GetPassPW'

     Begin Object Class=GUIButton Name=GetPassRetry
         Caption="SUBMIT"
         StyleName="SelectButton"
         WinTop=0.730455
         WinLeft=0.320899
         WinWidth=0.147500
         WinHeight=0.045000
         TabOrder=1
         bBoundToParent=True
         OnClick=ROSteamLoginPage.InternalOnClick
         OnKeyEvent=GetPassRetry.InternalOnKeyEvent
     End Object
     b_OK=GUIButton'ROInterface.ROSteamLoginPage.GetPassRetry'

     Begin Object Class=GUILabel Name=GetPassLabel
         Caption="Steam Login Expired or Invalid, Enter Password To Login"
         TextAlign=TXTA_Center
         FontScale=FNS_Large
         StyleName="TextLabel"
         WinTop=0.195980
         WinLeft=0.024805
         WinWidth=0.940430
         WinHeight=0.054688
         bBoundToParent=True
     End Object
     l_Text=GUILabel'ROInterface.ROSteamLoginPage.GetPassLabel'

     bAllowedAsLast=True
     OpenSound=Sound'ROMenuSounds.Generic.msfxEdit'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fri 13-10-2023 03:17:28.000 - Creation time: Fri 13-10-2023 03:19:07.451 - Created with UnCodeX