## XIDInterf
Class XIIIMenuLiveJoinStartWindow

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

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

Direct Known Subclasses:None

class XIIIMenuLiveJoinStartWindow
extends XIDInterf.XIIILiveWindow

Variables
`string` | `ButtonNames[7]`
`XIIIGUIButton` | `Buttons[7]`
`string` | `TitleText`
`string` | `strLadderInfo,strLadderInfoCap`

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` | `JoinGameTest()`
`void` | `Paint(Canvas C, float X, float Y)`
`void` | `ReturnMsgBox(byte bButton)`
`void` | `ShowWindow()`

Source Code

    00001	class XIIIMenuLiveJoinStartWindow extends XIIILiveWindow;
    00002
    00003	//var string MapList[64];
    00004	//var int MaxMaps, onMap;
    00005
    00006	//var GUIListBox listbox;
    00007	//var GUISlider  slider;
    00008	var localized string TitleText;
    00009
    00010	var XIIIGUIButton Buttons[7];
    00011	var localized string ButtonNames[7];
    00012	var localized string strLadderInfo,strLadderInfoCap;
    00013
    00014	function Created()
    00015	{
    00016	  local int i;
    00017	     Super.Created();
    00018
    00019	/*     leftArrow = XIIIArrowbutton(CreateControl(class'XIIIArrowbutton', 0, 0, 12, 12));
    00020	     leftArrow.WinLeft = 200;
    00021	     leftArrow.WinTop = ControlOffset + 4;
    00022	     leftArrow.bLeftOrient = true;
    00023	     rightArrow = XIIIArrowbutton(CreateControl(class'XIIIArrowbutton', 0, 0, 12, 12));
    00024	     rightArrow.WinLeft = 208;
    00025	     rightArrow.WinTop = ControlOffset + 4;  */
    00026
    00027	/*
    00028	     listbox = GUIListbox(CreateControl(class'GUIListBox', 100, 100, 100, 200));
    00029	     listbox.StyleName = "Listbox";
    00030	     listbox.List.Add("Hello");
    00031	     listbox.List.Add("World");
    00032	     listbox.List.ItemsPerPage = 5;
    00033	     Controls[0]=listbox;
    00034	     */
    00035
    00036	     //slider = GUISlider(CreateControl(class'GUISlider', 0, 120, 100, 20));
    00037	     //Controls[2]=slider;
    00038
    00039	     //listbox.WinLeft = 200;
    00040	     //listbox.WinTop = 100;
    00041	}
    00042
    00043
    00044	function InitComponent(GUIController MyController,GUIComponent MyOwner)
    00045	{
    00046	  //local int numberOfAccounts, q;
    00047	  //local string temp;
    00048
    00049	  Super.InitComponent(MyController, MyOwner);
    00050	     //listbox = GUIListBox(Controls[0]);
    00051
    00052		Buttons[0] = XIIIGUIButton(Controls[0]);
    00053		Buttons[0].Caption = ButtonNames[0];
    00054		Buttons[1] = XIIIGUIButton(Controls[1]);
    00055		Buttons[1].Caption = ButtonNames[1];
    00056		Buttons[2] = XIIIGUIButton(Controls[2]);
    00057		Buttons[2].Caption = ButtonNames[2];
    00058		Buttons[3] = XIIIGUIButton(Controls[3]);
    00059		Buttons[3].Caption = ButtonNames[3];
    00060		Buttons[4] = XIIIGUIButton(Controls[4]);
    00061		Buttons[4].Caption = ButtonNames[4];
    00062		Buttons[5] = XIIIGUIButton(Controls[5]);
    00063		Buttons[5].Caption = ButtonNames[6];
    00064		Buttons[6] = XIIIGUIButton(Controls[6]);
    00065		Buttons[6].Caption = ButtonNames[5];
    00066
    00067		OnClick = InternalOnClick;
    00068
    00069
    00070	     /*
    00071	     listbox.list.clear();
    00072	     numberOfAccounts = xboxlive.GetNumberOfAccounts();
    00073	     for (q=0; q<numberOfAccounts; q++)
    00074	     {
    00075	       temp = xboxlive.GetAccountName(q);
    00076	       listbox.list.Add(temp);
    00077	     }
    00078
    00079	     listbox.list.Add(newAccountString);
    00080	     listbox.bVisibleWhenEmpty = true;
    00081	     */
    00082	}
    00083
    00084
    00085	function ShowWindow()
    00086	{
    00087	     OnMenu = 0; myRoot.bFired = false;
    00088	     Super.ShowWindow();
    00089	     bShowBCK = true;
    00090	     bShowRUN = false;
    00091	     bShowSEL = true;
    00092	}
    00093
    00094
    00095	function Paint(Canvas C, float X, float Y)
    00096	{
    00097	  Super.Paint(C, X, Y);
    00098	  PaintStandardBackground(C, X, Y, TitleText);
    00099	}
    00100
    00101	function ReturnMsgBox(byte bButton)
    00102	{
    00103	  switch (bButton)
    00104	  {
    00105	    case QBTN_Ok:
    00106	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveLadderWindow");
    00107	    return;
    00108	  }
    00109	}
    00110
    00111	function JoinGameTest()
    00112	{
    00113	     local string URL, Checksum;
    00114	     local int N;
    00115
    00116	     URL = "192.168.0.18";
    00117	     //URL = "192.168.0.18:7777";
    00118	/*     class'StatLog'.Static.GetPlayerChecksum(GetPlayerOwner(), Checksum);
    00119	     if (Checksum == "")
    00120	          URL = URL $ "?Checksum=NoChecksum";
    00121	     else
    00122	          URL = URL $ "?Checksum="$Checksum;
    00123	*/
    00124	    myRoot.bXboxStartup = true;
    00125	    myRoot.CloseAll(true);
    00126	    myRoot.GotoState('');
    00127	     GetPlayerOwner().AttribPadToViewport();
    00128	     log("TRAVELING w/URL: "$URL);
    00129	     //GetPlayerOwner().ClientTravel(URL, TRAVEL_Absolute, false);
    00130	    GetPlayerOwner().ConsoleCommand("start 192.168.0.18");
    00131	}
    00132
    00133	// Called when a button is clicked
    00134	function bool InternalOnClick(GUIComponent Sender)
    00135	{
    00136	    local XIIIMenuLiveQuickmatchWindow page;
    00137	    local int i;
    00138	    if (Sender == Controls[5])
    00139	    {
    00140	      //Controller.OpenMenu("XIDInterf.XIIIMenuLiveLadderWindow");
    00141	      Controller.OpenMenu("XIDInterf.XIIILiveMsgBox",false);
    00142	      msgbox = XIIILiveMsgBox(myRoot.ActivePage);
    00143	      msgbox.SetupQuestion(strLadderInfo, QBTN_Ok, QBTN_Ok, strLadderInfoCap);
    00144	      msgbox.OnButtonClick=ReturnMsgBox;
    00145	      msgbox.bCheckNetworkCable=true;
    00146	      msgbox.InitBox(160*fRatioX, 130*fRatioY*fScaleTo, 16, 16, 320*fRatioX, 250*fRatioY*fScaleTo);
    00147	      return true;
    00148	    }
    00149	    if (Sender == Controls[6])
    00150	    {
    00151	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveCreateWindow");
    00152	      return true;
    00153	    }
    00154	    if (Sender == Controls[0])
    00155	    {
    00156	      //JoinGameTest();
    00157	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveQuickmatchWindow");
    00158	      page = XIIIMenuLiveQuickmatchWindow(myRoot.ActivePage);
    00159	      page.Start(GT_DM);
    00160	      return true;
    00161	    }
    00162	    if (Sender == Controls[1])
    00163	    {
    00164	      //JoinGameTest();
    00165	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveQuickmatchWindow");
    00166	      page = XIIIMenuLiveQuickmatchWindow(myRoot.ActivePage);
    00167	      page.Start(GT_TeamDM);
    00168	      return true;
    00169	    }
    00170	    if (Sender == Controls[2])
    00171	    {
    00172	      //JoinGameTest();
    00173	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveQuickmatchWindow");
    00174	      page = XIIIMenuLiveQuickmatchWindow(myRoot.ActivePage);
    00175	      page.Start(GT_CTF);
    00176	      return true;
    00177	    }
    00178	    if (Sender == Controls[3])
    00179	    {
    00180	      //JoinGameTest();
    00181	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveQuickmatchWindow");
    00182	      page = XIIIMenuLiveQuickmatchWindow(myRoot.ActivePage);
    00183	      page.Start(GT_Sabotage);
    00184	      return true;
    00185	    }
    00186	    if (Sender == Controls[4])
    00187	    {
    00188	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveOptimatchWindow");
    00189	      return true;
    00190	    }
    00191	    return false;
    00192	}
    00193
    00194
    00195	function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
    00196	{
    00197	    if (state==1/* || state==2*/)// IST_Press // to avoid auto-repeat
    00198	    {
    00199	        if ((Key==0x0D/*IK_Enter*/) || (Key==0x01))
    00200		    {
    00201	          //Controller.FocusedControl.OnClick(Self);
    00202	          InternalOnClick(Controller.FocusedControl);
    00203	          return true;
    00204		    }
    00205		    if ((Key==0x08/*IK_Backspace*/)|| (Key==0x1B))
    00206		    {
    00207		        myRoot.CloseMenu(true);
    00208	    	    return true;
    00209		    }
    00210		    if (Key==0x25/*IK_Left*/)
    00211		    {
    00212	    	    return true;
    00213		    }
    00214		    if (Key==0x27/*IK_Right*/)
    00215		    {
    00216	    	    return true;
    00217		    }
    00218	    }
    00219	    return super.InternalOnKeyEvent(Key, state, delta);
    00220	}
    00221
    00222
    00223

End Source Code