## XIDInterf
Class XIIIMenuLiveOldPlayerMenuSelectedGamerTagNothingFriend

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

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

Direct Known Subclasses:None

class XIIIMenuLiveOldPlayerMenuSelectedGamerTagNothingFriend
extends XIDInterf.XIIILiveWindow

Variables
`string` | `ButtonNames[2]`
`XIIIGUIButton` | `Buttons[2]`
`string` | `TitleText`
`XboxLiveManager.FRIEND_PACKET` | `activeFriend`
`string` | `activeFriendName`
`XIIILiveMsgBox` | `msgbox`
`int` | `popupStatus`
`strTitle,` | `strSendGameInviteQuestion`

Function Summary
`void` | `Created()`
`void` | `InitComponent(GUIController MyController, GUIComponent MyOwner)`
`bool` | `InternalOnClick(GUIComponent Sender)`
    // Called when a button is clicked
`bool` | `InternalOnKeyEvent(out byte, out byte, float delta)`
`void` | `Paint(Canvas C, float X, float Y)`
`void` | `ReturnMsgBox(byte bButton)`
`void` | `ShowWindow()`

Source Code

    00001	class XIIIMenuLiveOldPlayerMenuSelectedGamerTagNothingFriend extends XIIILiveWindow;
    00002
    00003	var localized string TitleText;
    00004
    00005	var XIIIGUIButton Buttons[2];
    00006	var localized string ButtonNames[2];
    00007	var localized string strTitle, strSendGameInviteQuestion;
    00008
    00009	var XboxLiveManager.FRIEND_PACKET activeFriend;
    00010	var string                        activeFriendName;
    00011
    00012	var XIIILiveMsgBox msgbox;
    00013	var int popupStatus;
    00014
    00015	enum eVoiceStatus
    00016	{
    00017	  VOICESTATUS_voiceon,
    00018	  VOICESTATUS_voicemuted,
    00019	  VOICESTATUS_voicetv,
    00020	  VOICESTATUS_voicenone,
    00021	};
    00022
    00023
    00024
    00025	function Created()
    00026	{
    00027	  local int i;
    00028	     Super.Created();
    00029
    00030	}
    00031
    00032
    00033	function InitComponent(GUIController MyController,GUIComponent MyOwner)
    00034	{
    00035	  Super.InitComponent(MyController, MyOwner);
    00036
    00037		Buttons[0] = XIIIGUIButton(Controls[0]);
    00038		Buttons[0].Caption = ButtonNames[0];
    00039		//Buttons[1] = XIIIGUIButton(Controls[1]);
    00040		//Buttons[1].Caption = ButtonNames[0];
    00041
    00042		OnClick = InternalOnClick;
    00043	}
    00044
    00045
    00046	function ShowWindow()
    00047	{
    00048	  OnMenu = 0; myRoot.bFired = false;
    00049	  Super.ShowWindow();
    00050	  bShowBCK = true;
    00051	  bShowRUN = false;
    00052	  bShowSEL = true;
    00053
    00054	  activeFriend = xboxlive.GetActiveFriend();
    00055	  activeFriendName = xboxlive.GetActiveFriendName();
    00056	  TitleText = activeFriendName;
    00057
    00058	//  ButtonNames(0)="Send a game invitation"
    00059	//  ButtonNames(1)="Remove friend"
    00060	//  ButtonNames(2)="Join"
    00061
    00062	  if (!xboxlive.IsIngame() && !xboxlive.IsLadderGame())
    00063	  {
    00064	    Buttons[0].bVisible = false;
    00065	  }
    00066
    00067	/* Should not happen!
    00068	  if ( (activeFriend.onlineStatusFlags & xboxlive.XONLINE_FRIENDSTATE_FLAG_RECEIVEDREQUEST) != 0 )
    00069	  {
    00070	    Buttons[0].bVisible=true;
    00071	    Buttons[1].bVisible=true;
    00072	    Buttons[2].bVisible=true;
    00073	    SetFocus(Buttons[0]);
    00074	    Buttons[0].SetFocus(none);
    00075	  }
    00076	  else
    00077	  {
    00078	    Buttons[0].bVisible=false;
    00079	    Buttons[1].bVisible=false;
    00080	    Buttons[2].bVisible=false;
    00081	    SetFocus(Buttons[3]);
    00082	    Buttons[3].SetFocus(none);
    00083	  }
    00084	*/
    00085
    00086	}
    00087
    00088
    00089	function Paint(Canvas C, float X, float Y)
    00090	{
    00091	     Super.Paint(C, X, Y);
    00092	  PaintStandardBackground(C, X, Y, TitleText);
    00093	}
    00094
    00095	function ReturnMsgBox(byte bButton)
    00096	{
    00097	  switch (bButton)
    00098	  {
    00099	    case QBTN_Ok:
    00100	      if (popupStatus == 1)
    00101	      {
    00102	        xboxlive.SendGameInvite(activeFriendName);
    00103	        myRoot.CloseMenu(true);
    00104	      }
    00105	      popupStatus = 0;
    00106	      return;
    00107	    break;
    00108
    00109	    case QBTN_Cancel:
    00110	      popupStatus = 0;
    00111	    break;
    00112
    00113	  }
    00114	}
    00115
    00116	// Called when a button is clicked
    00117	function bool InternalOnClick(GUIComponent Sender)
    00118	{
    00119	    local int i;
    00120	    if (Sender == Controls[0])
    00121	    {
    00122	      // Game invite
    00123	      Controller.OpenMenu("XIDInterf.XIIILiveMsgBox",false);
    00124	      msgbox = XIIILiveMsgBox(myRoot.ActivePage);
    00125	      msgbox.SetupQuestion(strSendGameInviteQuestion, QBTN_Ok | QBTN_Cancel, QBTN_Cancel, activeFriendName);
    00126	      msgbox.OnButtonClick=ReturnMsgBox;
    00127	      msgbox.InitBox(160*fRatioX, 130*fRatioY*fScaleTo, 16, 16, 320*fRatioX, 230*fRatioY*fScaleTo);
    00128	      popupStatus = 1;
    00129	      return true;
    00130
    00131	    }
    00132	    /*else if (Sender == Controls[0])
    00133	    {
    00134	      // send feedback
    00135	      myRoot.OpenMenu("XIDInterf.XIIIMenuLiveFeedback");
    00136	      return true;
    00137	    }*/
    00138
    00139	    return true;
    00140	}
    00141
    00142
    00143	function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
    00144	{
    00145	    if (state==1/* || state==2*/)// IST_Press // to avoid auto-repeat
    00146	    {
    00147	        if ((Key==0x0D/*IK_Enter*/) || (Key==0x01))
    00148		    {
    00149	          //Controller.FocusedControl.OnClick(Self);
    00150	          InternalOnClick(Controller.FocusedControl);
    00151	          return true;
    00152		    }
    00153		    if ((Key==0x08/*IK_Backspace*/)|| (Key==0x1B))
    00154		    {
    00155		        myRoot.CloseMenu(true);
    00156	    	    return true;
    00157		    }
    00158		    if (Key==0x25/*IK_Left*/)
    00159		    {
    00160	    	    return true;
    00161		    }
    00162		    if (Key==0x27/*IK_Right*/)
    00163		    {
    00164	    	    return true;
    00165		    }
    00166	    }
    00167	    return super.InternalOnKeyEvent(Key, state, delta);
    00168	}
    00169
    00170
    00171

End Source Code