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

GUI2K4.UT2K4SP_CGBRTrade


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
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
//==============================================================================
// Single Player Challenge Bloodrite Trade page
// Message that you won a player and have to assign it to your team
//
// Written by Michiel Hendriks
// (c) 2003, 2004, Epic Games, Inc. All Rights Reserved
//==============================================================================

class UT2K4SP_CGBRTrade extends UT2K4SP_CGBRUnTrade;

var automated GUICharacterListTeam clSelChar;
var automated GUIButton btnNextChar, btnPrevChar;

/** Warn the player that there's no empty spot */
var localized string FullTeamWarning;
/** Info about the player being fires */
var localized string FireInfo;
/** true if the player has afull team */
var bool bHasFullTeam;

var UT2K4GameProfile GP;

event InitComponent(GUIController MyController, GUIComponent MyOwner)
{
	lblTitle.WinWidth=0.762501;
	lblTitle.WinHeight=0.058750;
	lblTitle.WinLeft=0.024063;
	lblTitle.WinTop=0.067846;

	imgPictureBg.WinWidth=0.121667;
	imgPictureBg.WinHeight=0.326250;
	imgPictureBg.WinLeft=0.044722;
	imgPictureBg.WinTop=0.149198;

	imgPicture.WinWidth=0.116667;
	imgPicture.WinHeight=0.312500;
	imgPicture.WinLeft=0.048472;
	imgPicture.WinTop=0.164198;

	btnOk.WinWidth=0.222222;
	btnOk.WinHeight=0.050694;
	btnOk.WinLeft=0.360070;
	btnOk.WinTop=0.821064;

	sbMessage.WinWidth=0.458332;
	sbMessage.WinHeight=0.306111;
	sbMessage.WinLeft=0.213542;
	sbMessage.WinTop=0.182976;

    super.InitComponent(MyController, MyOwner);
    GP = UT2K4GameProfile(PlayerOwner().Level.Game.CurrentGameProfile);
    bHasFullTeam = GP.HasFullTeam();
    clSelChar.PopulateList(GP.PlayerTeam);
	clSelChar.Index = 0;
    if (!bHasFullTeam)
	{
		btnNextChar.DisableMe();
		btnPrevChar.DisableMe();
		clSelChar.DisableMe();
	}
}

function SetDescription()
{
	local string tmp;
	if (bHasFullTeam)
	{
		tmp = Message$"||"$FullTeamWarning$"||"$FireInfo;

    	tmp = repl(tmp, "%player%", TargetPlayerName);
		tmp = repl(tmp, "%enemyteam%", ETI.default.TeamName);

		tmp = repl(tmp, "%fireplayer%", clSelChar.GetName());
		tmp = repl(tmp, "%refund%", GP.MoneyToString(GP.GetBotPrice(clSelChar.GetName())));

		sbMessage.SetContent(tmp);
	}
	else super.SetDescription();
}

function UpdateDetails(GUIComponent Sender)
{
	SetDescription();
}

function bool onSelectChar(GUIComponent Sender)
{
	if ( Sender == btnPrevChar )
	{
		clSelChar.ScrollLeft();
	}
	else if ( Sender == btnNextChar )
	{
		clSelChar.ScrollRight();
	}
	return true;
}

function OnClose(optional bool bCancel)
{
	if (bHasFullTeam) GP.ReleaseTeammate(clSelChar.GetName());
	GP.AddTeammate(TargetPlayerName);
}

DefaultProperties
{
	Begin Object Class=GUIButton Name=CGBbtnPrevChar
		Hint="Select the team mate you want to fire"
		StyleName="ArrowLeft"
		WinWidth=0.048750
		WinHeight=0.061250
		WinLeft=0.805001
		WinTop=0.806667
		bNeverFocus=true
		bRepeatClick=true
		OnClickSound=CS_Down
		OnClick=onSelectChar
		bBoundToParent=true
	End Object
	btnPrevChar=CGBbtnPrevChar

	Begin Object Class=GUIButton Name=CGBbtnNextChar
		Hint="Select the team mate you want to fire"
		StyleName="ArrowRight"
		WinWidth=0.048750
		WinHeight=0.061250
		WinLeft=0.898438
		WinTop=0.806667
		bNeverFocus=true
		bRepeatClick=true
		OnClickSound=CS_Up
		OnClick=onSelectChar
		bBoundToParent=true
	End Object
	btnNextChar=CGBbtnNextChar

	Begin Object class=GUICharacterListTeam Name=CGBclSelChar
		Hint="You will fire this team mate"
		WinWidth=0.124694
		WinHeight=0.325000
		WinLeft=0.807213
		WinTop=0.149584
		bCenterInBounds=true
		FixedItemsPerPage=1
		StyleName="CharButton"
		TabOrder=0
		OnChange=UpdateDetails
		bBoundToParent=true
	End Object
	clSelChar=CGBclSelChar

	DefaultWidth=0.8
	DefaultHeight=0.5
	DefaultLeft=0.1
	DefaultTop=0.25

	WinWidth=0.8
	WinHeight=0.5
	WinLeft=0.1
	WinTop=0.25

    Message="You have won the challenge against %enemyteam%. %player% will now become part of your team."
	FullTeamWarning="However your team is already at capacity. You will have to fire one of your team mates first. You will be refunded for the loss of the selected player."
	FireInfo="You have selected to fire %fireplayer%, the refund will be %refund%."
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:28:52.000 - Creation time: Do 14.8.2014 09:58:53.980 - Created with UnCodeX