## XIDInterf
Class XIIIMenuLiveScoreboard

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

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

Direct Known Subclasses:None

class XIIIMenuLiveScoreboard
extends XIDInterf.XIIILiveWindow

Variables
`string` | `ButtonNames[5]`
`XIIIGUIButton` | `Buttons[5]`
`string` | `TitleText`
`flagscapt,` | `flagsret`
`s_flagscapt,` | `s_flagsret`

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` | `ShowWindow()`

Source Code

    00001	class XIIIMenuLiveScoreboard extends XIIILiveWindow;
    00002
    00003	var localized string TitleText;
    00004
    00005	//actual word
    00006	var localized string kills, deaths, suicides, gamesplayed, gameswon, minutesplayed, flagscapt, flagsret;
    00007	// s_ = symbol
    00008	var localized string s_kills, s_deaths, s_suicides, s_gamesplayed, s_gameswon, s_minutesplayed, s_flagscapt, s_flagsret;
    00009
    00010	var XIIIGUIButton Buttons[5];
    00011	var localized string ButtonNames[5];
    00012
    00013	function Created()
    00014	{
    00015	  local int i;
    00016	  Super.Created();
    00017	}
    00018
    00019
    00020	function InitComponent(GUIController MyController,GUIComponent MyOwner)
    00021	{
    00022	  Super.InitComponent(MyController, MyOwner);
    00023		OnClick = InternalOnClick;
    00024
    00025		Buttons[0] = XIIIGUIButton(Controls[0]);
    00026		Buttons[0].Caption = ButtonNames[0];
    00027		Buttons[1] = XIIIGUIButton(Controls[1]);
    00028		Buttons[1].Caption = ButtonNames[1];
    00029		Buttons[2] = XIIIGUIButton(Controls[2]);
    00030		Buttons[2].Caption = ButtonNames[2];
    00031		Buttons[3] = XIIIGUIButton(Controls[3]);
    00032		Buttons[3].Caption = ButtonNames[3];
    00033		Buttons[4] = XIIIGUIButton(Controls[4]);
    00034		Buttons[4].Caption = ButtonNames[4];
    00035	}
    00036
    00037
    00038	function ShowWindow()
    00039	{
    00040	     OnMenu = 0; myRoot.bFired = false;
    00041	     Super.ShowWindow();
    00042	     bShowBCK = true;
    00043	     bShowRUN = false;
    00044	     bShowSEL = true;
    00045	}
    00046
    00047
    00048	function Paint(Canvas C, float X, float Y)
    00049	{
    00050	  local int hpos;
    00051	  Super.Paint(C, X, Y);
    00052	  PaintStandardBackground(C, X, Y, TitleText);
    00053
    00054	  hpos = 242;
    00055
    00056	  C.SetPos(290, (hpos));
    00057	  C.DrawText(s_kills$" - "$kills, false);
    00058
    00059	  C.SetPos(290, (hpos+=20));
    00060	  C.DrawText(s_deaths$" - "$deaths, false);
    00061
    00062	  C.SetPos(290, (hpos+=20));
    00063	  C.DrawText(s_suicides$" - "$suicides, false);
    00064
    00065	  C.SetPos(290, (hpos+=20));
    00066	  C.DrawText(s_gamesplayed$" - "$gamesplayed, false);
    00067
    00068	  //C.SetPos(290, (hpos+=20));
    00069	  //C.DrawText(s_gameswon$" - "$gameswon, false);
    00070
    00071	  C.SetPos(290, (hpos+=20));
    00072	  C.DrawText(s_minutesplayed$" - "$minutesplayed, false);
    00073
    00074	  C.SetPos(290, (hpos+=20));
    00075	  C.DrawText(s_flagscapt$" - "$flagscapt, false);
    00076
    00077	  C.SetPos(290, (hpos+=20));
    00078	  C.DrawText(s_flagsret$" - "$flagsret, false);
    00079	}
    00080
    00081
    00082	// Called when a button is clicked
    00083	function bool InternalOnClick(GUIComponent Sender)
    00084	{
    00085	    local int i;
    00086	    if (Sender == Buttons[0])
    00087	    {
    00088	      xboxlive.SetLadderGame(false);
    00089	      xboxlive.SetStatisticsType(GT_DM);
    00090	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveScoreboardMain");
    00091	    }
    00092	    else if (Sender == Buttons[1])
    00093	    {
    00094	      xboxlive.SetLadderGame(false);
    00095	      xboxlive.SetStatisticsType(GT_TeamDM);
    00096	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveScoreboardMain");
    00097	    }
    00098	    else if (Sender == Buttons[2])
    00099	    {
    00100	      xboxlive.SetLadderGame(false);
    00101	      xboxlive.SetStatisticsType(GT_CTF);
    00102	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveScoreboardMain");
    00103	    }
    00104	    else if (Sender == Buttons[3])
    00105	    {
    00106	      xboxlive.SetLadderGame(false);
    00107	      xboxlive.SetStatisticsType(GT_Sabotage);
    00108	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveScoreboardMain");
    00109	    }
    00110	    else if (Sender == Buttons[4])
    00111	    {
    00112	      xboxlive.SetLadderGame(true);
    00113	      xboxlive.SetStatisticsType(GT_Ladder);
    00114	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveScoreboardMain");
    00115	    }
    00116	    /*else if (Sender == Buttons[4])
    00117	    {
    00118	      xboxlive.SetStatisticsType(GT_Duel);
    00119	      Controller.OpenMenu("XIDInterf.XIIIMenuLiveScoreboardMain");
    00120	    }*/
    00121	    return true;
    00122	}
    00123
    00124
    00125	function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
    00126	{
    00127	    if (state==1/* || state==2*/)// IST_Press // to avoid auto-repeat
    00128	    {
    00129	        if ((Key==0x0D/*IK_Enter*/) || (Key==0x01))
    00130		    {
    00131	          //Controller.FocusedControl.OnClick(Self);
    00132	          InternalOnClick(Controller.FocusedControl);
    00133	          return true;
    00134		    }
    00135		    if ((Key==0x08/*IK_Backspace*/)|| (Key==0x1B))
    00136		    {
    00137		        myRoot.CloseMenu(true);
    00138	    	    return true;
    00139		    }
    00140		    if (Key==0x25/*IK_Left*/)
    00141		    {
    00142	    	    return true;
    00143		    }
    00144		    if (Key==0x27/*IK_Right*/)
    00145		    {
    00146	    	    return true;
    00147		    }
    00148	    }
    00149	    return super.InternalOnKeyEvent(Key, state, delta);
    00150	}
    00151
    00152
    00153
    00154

End Source Code