## XIDInterf
Class XIIIMenuLiveStatsWritePage

source: C:\XIII\XIDInterf\Classes\XIIIMenuLiveStatsWritePage.uc

    Core.Object
       |
       +--GUI.GUI
          |
          +--GUI.GUIComponent
             |
             +--GUI.GUIMultiComponent
                |
                +--GUI.GUIPage
                   |
                   +--XIDInterf.XIIIWindow
                      |
                      +--XIDInterf.XIIILiveWindow
                         |
                         +--XIDInterf.XIIIMenuLiveStatsWritePage

Direct Known Subclasses:None

class XIIIMenuLiveStatsWritePage
extends XIDInterf.XIIILiveWindow

    //-----------------------------------------------------------
    //
    //-----------------------------------------------------------

Variables
`XIIILiveMsgBox` | `MsgBox`
`XIIIMsgBoxInGame` | `MsgBoxIngm`
`XIIILiveMsgBox` | `MsgBoxnetfailure`
`string` | `confirmquittext`
`bool` | `hasstarted`
`bool` | `netfailshouldshow`
`statwritestartingString,` | `statwritepleasewaitString`
`int` | `userState`

Function Summary
`void` | `Created()`
`void` | `InitComponent(GUIController MyController, GUIComponent MyOwner)`
`void` | `Paint(Canvas C, float X, float Y)`
`void` | `Process()`
`void` | `QuitMsgBoxReturn(byte bButton)`
`void` | `QuitMsgBoxnetfailReturn(byte bButton)`
`void` | `ShowWindow()`

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004
    00005	class XIIIMenuLiveStatsWritePage extends XIIILiveWindow;
    00006
    00007	var  localized string	 statwritefailedString, statwritestartingString, statwritepleasewaitString;
    00008	var int userState;
    00009	var bool hasstarted;
    00010	var bool netfailshouldshow;
    00011	var localized string confirmquittext;
    00012
    00013	var XIIILiveMsgBox MsgBox;
    00014	var XIIILiveMsgBox MsgBoxnetfailure;
    00015	var XIIIMsgBoxInGame MsgBoxIngm;
    00016
    00017
    00018	function Created()
    00019	{
    00020		fRatioX = 1.0;
    00021		fRatioY = 1.0;
    00022		fScaleTo = 1.0;
    00023
    00024		Super.Created();
    00025	}
    00026
    00027	function InitComponent(GUIController MyController,GUIComponent MyOwner)
    00028	{
    00029		Super.InitComponent(MyController, MyOwner);
    00030
    00031		if(netfailshouldshow == true)
    00032		{
    00033		myRoot.OpenMenu("XIDInterf.XIIILiveMsgBox");
    00034		  MsgBoxnetfailure = XIIILiveMsgBox(myRoot.ActivePage);
    00035		  MsgBoxnetfailure.SetupQuestion(confirmquittext, QBTN_Ok, QBTN_Ok, "");
    00036		  MsgBoxnetfailure.InitBox(160*fRatioX, 130*fRatioY*fScaleTo, 16, 16, 320*fRatioX, 230*fRatioY*fScaleTo);
    00037		  MsgBoxnetfailure.OnButtonClick = QuitMsgBoxnetfailReturn;
    00038		}
    00039	}
    00040
    00041	function ShowWindow()
    00042	{
    00043		OnMenu = 0;
    00044		myRoot.bFired = false;
    00045		Super.ShowWindow();
    00046		bShowBCK = false;
    00047		bShowRUN = false;
    00048		bShowSEL = false;
    00049	}
    00050
    00051	function Paint(Canvas C, float X, float Y)
    00052	{
    00053		Super.Paint(C, X, Y);
    00054		Process();
    00055	}
    00056
    00057	function QuitMsgBoxReturn(byte bButton)
    00058	{
    00059	}
    00060
    00061	function QuitMsgBoxnetfailReturn(byte bButton)
    00062	{
    00063		if ((bButton & QBTN_Ok) != 0)
    00064		{
    00065		  netfailshouldshow = false;
    00066		}
    00067	}
    00068
    00069	event HandleParameters(string Param1, string Param2)
    00070	{
    00071		if ( Param1=="netfailure" )
    00072		{
    00073	          netfailshouldshow = true;
    00074		}
    00075	}
    00076
    00077	function Process()
    00078	{
    00079		if(netfailshouldshow == false)
    00080		{
    00081		if(hasstarted == false)
    00082		{
    00083		  	  myRoot.OpenMenu("XIDInterf.XIIILiveMsgBox");
    00084		  	  msgbox = XIIILiveMsgBox(myRoot.ActivePage);
    00085			  msgbox.SetupQuestion(statwritepleasewaitString, 0, 0, statwritestartingString);
    00086			  msgbox.InitBox(160*fRatioX, 130*fRatioY*fScaleTo, 16, 16, 320*fRatioX, 230*fRatioY*fScaleTo);
    00087
    00088			XIIIMPPlayerController(GetPlayerOwner()).StatUpdate();
    00089			hasstarted = true;
    00090		}
    00091
    00092		if(xboxlive.IsMyStatsUpdateDone() == true)
    00093		{
    00094			//if(xboxlive.WasMyStatsUpdateSuccessful() == false)
    00095			//{
    00096			//	myRoot.CloseMenu(true);
    00097			//	myRoot.OpenMenu("XIDInterf.XIIILiveMsgBox");
    00098			//	msgbox = XIIILiveMsgBox(myRoot.ActivePage);
    00099			//	msgbox.SetupQuestion(statwritepleasewaitString, QBTN_Ok, QBTN_Ok, statwritefailedString);
    00100			//	msgbox.InitBox(160*fRatioX, 130*fRatioY*fScaleTo, 16, 16, 320*fRatioX, 230*fRatioY*fScaleTo);
    00101			//	MsgBox.OnButtonClick = QuitMsgBoxReturn;
    00102			//}
    00103
    00104			userState = xboxlive.US_ONLINE;
    00105			if (xboxlive.HasUserVoice(xboxlive.GetCurrentUser()))
    00106				userState = userState | xboxlive.US_VOICE;
    00107			xboxlive.SetUserState(xboxlive.GetCurrentUser(), userState);
    00108			xboxlive.EnumerateFriends(FALSE);
    00109			xboxlive.ResetVoiceNet();
    00110			GetPlayerOwner().myHUD.bShowScores = false;
    00111			GetPlayerOwner().myHUD.bHideHud = true;
    00112			myRoot.CloseAll(true);
    00113			myRoot.GotoState('');
    00114			myRoot.Master.GlobalInteractions[0].ViewportOwner.Actor.ClientTravel("MapMenu", TRAVEL_Absolute, false);
    00115			GotoState('');
    00116		}
    00117	}
    00118	}
    00119
    00120

End Source Code