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

xVoting.KickInfoPage


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
//====================================================================
//  xVoting.KickInfoPage
//  Player Information Page.
//
//  Written by Bruce Bickar
//  (c) 2003, Epic Games, Inc.  All Rights Reserved
// ====================================================================

class KickInfoPage extends LargeWindow;

var automated GUIButton        b_ReturnButton;
var automated GUIImage         i_PlayerPortrait;
var automated GUILabel         l_PlayerName;
var automated PlayerInfoMultiColumnListBox lb_PlayerInfoBox;

var localized string PlayerText, PingText, ScoreText, IDText, IPText, KillsText,
                     DeathsText, SuicidesText, MultiKillsText, SpreesText;
//------------------------------------------------------------------------------------------------
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
	Super.Initcomponent(MyController, MyOwner);
	b_ReturnButton.OnClick=ReturnButtonOnClick;
}
//------------------------------------------------------------------------------------------------
function HandleParameters(string Param1, string Param2)
{
    LoadInfo(Param1);
}
//------------------------------------------------------------------------------------------------
function LoadInfo(string PlayerName)
{
	local int i, MultiKills, Sprees;
	local Material Portrait;
	local PlayerReplicationInfo PRI;

    if(PlayerName == "")
        return;

    if (!Controller.bCurMenuInitialized)
        return;

	for( i=0; i<PlayerOwner().GameReplicationInfo.PRIArray.Length; i++ )
	{
		if( PlayerOwner().GameReplicationInfo.PRIArray[i].PlayerName == PlayerName )
		{
			PRI = PlayerOwner().GameReplicationInfo.PRIArray[i];
			break;
		}
	}

    Portrait = PRI.GetPortrait();
    if(Portrait == None)
        Portrait = Material(DynamicLoadObject("PlayerPictures.cDefault", class'Material'));

    i_PlayerPortrait.Image = Portrait;
    l_PlayerName.Caption = PlayerName;

    lb_PlayerInfoBox.Add(PingText,string(PRI.Ping));
	lb_PlayerInfoBox.Add(ScoreText,string(PRI.Score));
	lb_PlayerInfoBox.Add(KillsText,string(PRI.Kills));
	lb_PlayerInfoBox.Add(DeathsText,string(PRI.Deaths));

	if( TeamPlayerReplicationInfo(PRI) != none )
	{
		lb_PlayerInfoBox.Add(SuicidesText,string(TeamPlayerReplicationInfo(PRI).Suicides));
		for (i = 0; i < 7; i++)
			MultiKills += TeamPlayerReplicationInfo(PRI).MultiKills[i];
		lb_PlayerInfoBox.Add(MultiKillsText,string(MultiKills));
		for (i = 0; i < 6; i++)
			Sprees += TeamPlayerReplicationInfo(PRI).Spree[i];
		lb_PlayerInfoBox.Add(SpreesText,string(Sprees));
	}
}
//------------------------------------------------------------------------------------------------
function bool ReturnButtonOnClick(GUIComponent Sender)
{
	Controller.CloseMenu(true);
	return true;
}
//------------------------------------------------------------------------------------------------

defaultproperties
{
     Begin Object Class=GUIButton Name=ExitButton
         Caption="Close"
         WinTop=0.531692
         WinLeft=0.670934
         WinWidth=0.120000
         WinHeight=0.033203
         RenderWeight=1.000000
         TabOrder=2
         OnKeyEvent=ExitButton.InternalOnKeyEvent
     End Object
     b_ReturnButton=GUIButton'xVoting.KickInfoPage.ExitButton'

     Begin Object Class=GUIImage Name=KickImagePlayerPortrait
         Image=Texture'2K4Menus.Controls.buttonThick_b'
         ImageStyle=ISTY_Scaled
         ImageRenderStyle=MSTY_Normal
         WinTop=0.193199
         WinLeft=0.206924
         WinWidth=0.155814
         WinHeight=0.358525
     End Object
     i_PlayerPortrait=GUIImage'xVoting.KickInfoPage.KickImagePlayerPortrait'

     Begin Object Class=GUILabel Name=PlayerNameLabel
         Caption="PlayerName"
         TextAlign=TXTA_Center
         TextColor=(B=255,G=255,R=255)
         TextFont="UT2SmallHeaderFont"
         WinTop=0.195429
         WinLeft=0.365679
         WinWidth=0.425371
         WinHeight=0.038297
         RenderWeight=0.300000
     End Object
     l_PlayerName=GUILabel'xVoting.KickInfoPage.PlayerNameLabel'

     Begin Object Class=PlayerInfoMultiColumnListBox Name=PlayerInfoBoxControl
         bVisibleWhenEmpty=True
         OnCreateComponent=PlayerInfoBoxControl.InternalOnCreateComponent
         StyleName="ServerBrowserGrid"
         WinTop=0.234286
         WinLeft=0.366960
         WinWidth=0.422477
         WinHeight=0.299483
     End Object
     lb_PlayerInfoBox=PlayerInfoMultiColumnListBox'xVoting.KickInfoPage.PlayerInfoBoxControl'

     PingText="Ping"
     ScoreText="Score"
     IDText="Player ID"
     IPText="IP Address"
     KillsText="Kills"
     DeathsText="Deaths"
     SuicidesText="Suicides"
     MultiKillsText="MultiKills"
     SpreesText="Sprees"
     bRequire640x480=False
     bAllowedAsLast=True
     WinTop=0.151276
     WinLeft=0.188743
     WinWidth=0.622502
     WinHeight=0.440703
     bAcceptsInput=False
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: pr 5-2-2018 12:35:56.000 - Creation time: sk 18-3-2018 09:50:11.729 - Created with UnCodeX