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

GUI2K4.UT2K4SP_CGBloodRites


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
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740
00741
00742
00743
//==============================================================================
// Challenge a team and win a team mate
//
// Written by Michiel Hendriks
// (c) 2003, 2004, Epic Games, Inc. All Rights Reserved
//==============================================================================

class UT2K4SP_CGBloodRites extends LargeWindow;

var automated GUIImage imgMap1, imgMap2, imgMapBg1, imgMapBg2;
var automated GUIButton btnOk, btnCancel, btnNextChar, btnPrevChar;
var automated GUILabel lblTitle, lblNoPreview1, lblNoPreview2, lblSelChar, lblSelCharName, lblBalance;
var automated GUIGFXButton cbMap1, cbMap2;
var automated moComboBox cbEnemyTeam;
var automated GUIScrollTextBox sbDetails;
var automated GUICharacterListTeam clSelChar;
var automated moCheckBox cbInstaGib;

var UT2K4GameProfile GP;

/** the penalty we pay when we cancel the challenge */
var int CancelPenalty;

var array<CacheManager.MapRecord> MapData;
/** The two maps to choose from */
var CacheManager.MapRecord MapOptions[2];

/** set to the preselect/challenged team */
var string ChallengedBy;
/** true if we have been challenged */
var bool bChallenged;

var localized string PenaltyWarning, YouveBeenChallenged, SelectAMap,
	msgChallenge, msgChallenged, msgInstaGib, CantAffordCancel;
/** always append this to the url */
var string DefaultUrl;

/** default gametype = xGame.xTeamGame */
var string ChalGameType;
/** additional URL for an instagib game = ?mutator = xGame.MutInstaGib */
var string MutInstaGib;
/** multiplicator for the cancel fee when challenged */
var float ChalledFeeMultiply;
/** diffirent goal scores for normal and insta game */
var int NormalGoalScore, InstaGoalScore;
/** prefix of the maps to use */
var string MapPreFix;


var int minimalEntryFee;

function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
	local int i;

	Super.Initcomponent(MyController, MyOwner);
	GP = UT2K4GameProfile(PlayerOwner().Level.Game.CurrentGameProfile);
	for ( i = 0; i < Controls.Length; i++ )
	{
		Controls[i].bScaleToParent=True;
		Controls[i].bBoundToParent=True;
	}

	class'CacheManager'.static.GetMapList(MapData, MapPreFix);
	for (i = MapData.length-1; i >= 0; i--)
	{
		if (MapData[i].PlayerCountMax < 7)    // remove small maps
		{
			MapData.Remove(i, 1);
			continue;
		}
		if (class'CacheManager'.static.Is2004Content(MapData[i].MapName)) continue;
		if (class'CacheManager'.static.Is2003Content(MapData[i].MapName)) continue;
		if (class'CacheManager'.static.IsBPContent(MapData[i].MapName)) continue;
		MapData.Remove(i, 1); // remove custom maps
	}

	SetupNoPreview(lblNoPreview1, imgMap1);
	SetupNoPreview(lblNoPreview2, imgMap2);

	sbDetails.SetContent(SelectAMap);
	GetRandomMaps();

	lblBalance.Caption = class'UT2K4SPTab_LadderBase'.default.BalanceLabel@GP.MoneyToString(GP.Balance);
}

function int CheapestBot(array<string> list)
{
	local int curmin, i, bp;
	curmin = MaxInt;
	for (i = 0; i < list.length; i++)
	{
		bp = GP.GetBotPrice(list[i],,, true);
		if (bp < curmin) curmin = bp;
	}
	return curmin;
}

function GetRandomMaps()
{
	MapOptions[0] = MapData[rand(MapData.length)];
	do {
		if (MapData.length <= 1)
		{
			Warn("MapData.length <= 1");
			break;
		}
		MapOptions[1] = MapData[rand(MapData.length)];
	} until (MapOptions[0] != MapOptions[1]);

	if (MapOptions[0].ScreenshotRef != "") imgMap1.Image = Material(DynamicLoadObject(MapOptions[0].ScreenshotRef, class'Material'));
	lblNoPreview1.bVisible = MapOptions[0].ScreenshotRef == "";
	cbMap1.Caption = MapOptions[0].MapName;
	if (MapOptions[1].ScreenshotRef != "") imgMap2.Image = Material(DynamicLoadObject(MapOptions[1].ScreenshotRef, class'Material'));
	lblNoPreview2.bVisible = MapOptions[1].ScreenshotRef == "";
	cbMap2.Caption = MapOptions[1].MapName;
}

function setChallengeInfo(int selectedMap)
{
	local string desc, tmp;
	local class<UT2K4TeamRoster> ETI;
	local CacheManager.GameRecord GR;

	GR = class'CacheManager'.static.getGameRecord(ChalGameType);
	ETI = class<UT2K4TeamRoster>(DynamicLoadObject(cbEnemyTeam.GetExtra(), class'Class'));

	GP.ChallengeInfo.LevelName = MapOptions[selectedMap].MapName;
	GP.ChallengeInfo.DifficultyModifier = ETI.default.TeamLevel / 1.2;
	GP.ChallengeInfo.PrizeMoney = 0; // never prize money for a bloodrite
	GP.ChallengeInfo.GameType = ChalGameType;
	if (cbInstaGib.IsChecked()) GP.ChallengeInfo.GoalScore = InstaGoalScore;
	else GP.ChallengeInfo.GoalScore = NormalGoalScore;
	if (bChallenged) GP.ChallengeInfo.EntryFee = 0;
	else GP.ChallengeInfo.EntryFee = GP.GetBotPrice(clSelChar.GetName(),,,true)*class'xGame.BloodRites'.default.ChalFeeMultiply; // 3 times the players value
	GP.ChallengeInfo.URLString = DefaultUrl;
	if (cbInstaGib.IsChecked()) GP.ChallengeInfo.URLString $= MutInstaGib;

	if (bChallenged) desc = msgChallenged;
	else desc = msgChallenge;
	desc = repl(desc, "%map%", MapOptions[selectedMap].MapName);
	desc = repl(desc, "%enemyteam%", cbEnemyTeam.GetText());
	desc = repl(desc, "%selectedchar%", clSelChar.GetName());
	desc = repl(desc, "%entryfee%", GP.MoneyToString(GP.ChallengeInfo.EntryFee));
	if (cbInstaGib.IsChecked()) tmp = msgInstaGib@GR.GameName;
	else tmp = GR.GameName;
	desc = repl(desc, "%gametype%", tmp);
	desc = repl(desc, "%penalty%", GP.MoneyToString(CancelPenalty));
	if ((GP.Balance < GP.getMinimalEntryFeeFor(GP.ChallengeInfo)+GP.MinBalance))
	{
		desc $= "|"$class'UT2K4SP_CGManoEMano'.default.NotEnoughCash;
	}
	sbDetails.SetContent(desc);

	if (bChallenged)
	{
		if (GP.ChallengeInfo.LevelName != "") btnOk.EnableMe();
			else btnOk.DisableMe();
	}
	else if ((GP.ChallengeInfo.LevelName != "") && (GP.Balance > GP.getMinimalEntryFeeFor(GP.ChallengeInfo)+GP.MinBalance)) btnOk.EnableMe();
		else btnOk.DisableMe();
}

/**
	param1 = preselect enemy team, fully qualified classname.
	param2 = not empty -> lock team change controlls
*/
event HandleParameters(string Param1, string Param2)
{
	local int i, cnt, minTeamFee, cbot;
	local class<UT2K4TeamRoster> ET;
	local array<string> ETR;
	local GUIController MyController;

	bChallenged = (Param2 != "");

	// count available team mates
	cnt = 0;
	for (i = 0; i < GP.GetMaxTeamSize(); i++)
	{
		if (GP.PlayerTeam[i] != "")
		{
			if (GP.BotStats[GP.GetBotPosition(GP.PlayerTeam[i])].Health >= 100) cnt++;
		}
	}
	GP.ChallengeInfo.NumBots = min(cnt*2+1, 7); // 7 or the number of available team mates

	// fill enemy team teams
	cbEnemyTeam.MyComboBox.List.Clear();
	minimalEntryFee = MaxInt;
	minTeamFee = GP.getMinimalTeamFee(GP.ChallengeInfo.NumBots / 2);
	for (i = 0; i < GP.TeamStats.length; i++)
	{
		if (GP.TeamStats[i].Matches > 0)
		{
			if (GP.TeamStats[i].Name == "") continue;
			ET = class<UT2K4TeamRoster>(DynamicLoadObject(GP.TeamStats[i].Name, class'Class'));
			if (ET != none)
			{
				if (!GP.GetAltTeamRoster(GP.TeamStats[i].Name, ETR)) ETR = ET.default.RosterNames;
				// we need to keep at least 5 players in a team
				if (bChallenged)
				{
					cbEnemyTeam.AddItem(ET.Default.TeamName@"("$class'UT2K4SPTab_DetailEnemies'.default.StrengthLabels[ET.Default.TeamLevel]$")",,GP.TeamStats[i].Name);
				}
				else if (ETR.Length > 5)
				{
					cbot = CheapestBot(ETR)*class'xGame.BloodRites'.default.ChalFeeMultiply;
					if (!bChallenged) cbot += minTeamFee; // if challenged we don't pay the team
					if (cbot < minimalEntryFee) minimalEntryFee = cbot;

					if (cbot < GP.Balance-GP.MinBalance)
						cbEnemyTeam.AddItem(ET.Default.TeamName@"("$class'UT2K4SPTab_DetailEnemies'.default.StrengthLabels[ET.Default.TeamLevel]$")",,GP.TeamStats[i].Name);
				}
			}
		}
	}
	log("Min. entry fee is"@minimalEntryFee@(minimalEntryFee+GP.MinBalance), GP.LogPrefix);
	cbEnemyTeam.MyComboBox.List.Sort();
	if (cbEnemyTeam.ItemCount() > 0)
	{
		cbEnemyTeam.SetIndex(0);
		UpdateEnemyTeam(cbEnemyTeam);
	}

	// fill other info
	ChallengedBy = Param1;
	if ((ChallengedBy != "") && (cbEnemyTeam.ItemCount() > 0)) cbEnemyTeam.SetIndex(cbEnemyTeam.FindExtra(ChallengedBy));
	if (bChallenged)
	{
		if (cbEnemyTeam.ItemCount() > 0)
		{
			cbEnemyTeam.DisableMe();
			clSelChar.PopulateList(GP.PlayerTeam);
			clSelChar.Find(clSelChar.PlayerList[rand(clSelChar.ItemCount)].DefaultName);
			CancelPenalty = GP.GetBotPrice(clSelChar.GetName())*ChalledFeeMultiply;
			clSelChar.DisableMe();
			btnNextChar.DisableMe();
			btnPrevChar.DisableMe();
			cbInstaGib.Checked(rand(2));
			cbInstaGib.DisableMe();

			UpdateDetails(none);
		}

		if (GP.Balance-GP.MinBalance <= CancelPenalty)
		{
			CancelPenalty = 0;
   			Controller.CloseMenu(true);
		}
	}
	else if (GP.Balance-GP.MinBalance <= minimalEntryFee) {
		MyController = Controller;
		Controller.CloseMenu(true);
		MyController.ShowQuestionDialog(class'UT2K4SP_CGManoEMano'.default.NotEnoughCash);
		return;
	}
}

/**
	Play the selected match, first check if we need to assign team mates
*/
function bool onOkClick(GUIComponent Sender)
{
	local int nummates, healthymates, i, j;
	local GUIQuestionPage QPage;
	local UT2K4SP_TeamRoles RoleWindow;
	local string tmp;

	if (GP.ChallengeInfo.EntryFee > GP.Balance) return false;
	nummates = GP.GetNumTeammatesForMatchInfo(GP.ChallengeInfo);
	if (nummates > 0)
	{
		healthymates = 0;
		for (i = 0; i < GP.GetMaxTeamSize(); i++)
		{
			j = GP.GetBotPosition(GP.PlayerTeam[i]);
			if (j > -1) if (GP.BotStats[j].Health >= 100) healthymates++;
		}

		if (healthymates < nummates)
		{
			if (Controller.OpenMenu(Controller.QuestionMenuClass))
			{
				QPage=GUIQuestionPage(Controller.TopPage());
				QPage.SetupQuestion(repl(repl(class'UT2K4SPTab_LadderBase'.default.NotEnoughPlayers, "%healthy%", healthymates), "%teammates%", nummates), QBTN_Ok);
			}
			return true;
		}

		GP.bIsChallenge = true;
		if (bChallenged) tmp = "true";
		if (Controller.OpenMenu(class'UT2K4SPTab_LadderBase'.default.TeamRoleWindow, tmp))
		{
			RoleWindow = UT2K4SP_TeamRoles(Controller.TopPage());
			RoleWindow.OnOkClick = StartMatch;
		}
	}
	else StartMatch();

	return true;
}

function StartMatch()
{
	GP.EnemyTeam = cbEnemyTeam.GetExtra();
	GP.ChallengeInfo.EnemyTeamName = GP.EnemyTeam;
	// when we are challenged we lose a player to that team (and gain none)
	// Important: this has to be set when we LOSE, not when we win.
	GP.bGotChallenged = bChallenged;
	if (bChallenged) GP.ChallengeInfo.SpecialEvent = "UNTRADE"@GP.ChallengeInfo.EnemyTeamName@clSelChar.GetName();
	// when we challenge we get a player (we have to give up one (with reward) when we already have 5)
	else GP.ChallengeInfo.SpecialEvent = "TRADE"@GP.ChallengeInfo.EnemyTeamName@clSelChar.GetName();
	GP.ChallengeVariable = clSelChar.GetName();
	Log("Special event set to:"@GP.ChallengeInfo.SpecialEvent);
	class'xGame.BloodRites'.static.StartChallenge(GP, PlayerOwner().Level);
	Controller.CloseAll(false,true);
}

/**
	Cancel button pressed
*/
function bool onCancelClick(GUIComponent Sender)
{
	if (OnCanWindowClose(true)) return Controller.CloseMenu(true);
	else return false;
}

/** Player accepts to pay the penalty */
function OnConfirmCancel(byte bButton)
{
	if (bButton == QBTN_Yes)
	{
		GP.Balance -= CancelPenalty;
		CancelPenalty = 0;
		Controller.CloseMenu(true);
	}
}

function OnMapSelect(GUIComponent Sender)
{
	if (Sender == cbMap1)
	{
		GP.ActiveMap = MapOptions[0];
		cbMap1.bChecked = true;
		cbMap2.bChecked = false;
		setChallengeInfo(0);
	}
	else {
		GP.ActiveMap = MapOptions[1];
		cbMap1.bChecked = false;
		cbMap2.bChecked = true;
		setChallengeInfo(1);
	}
	return;
}

function OnWindowClose(optional Bool bCancelled)
{
	GP.bIsChallenge = !bCancelled;
}

function bool OnCanWindowClose(optional Bool bCancelled)
{
	local GUIQuestionPage QPage;
	if (!bCancelled) return true;
	if (CancelPenalty > 0)
	{
	    if (CancelPenalty > GP.Balance)
	    {
	    	if (Controller.OpenMenu("GUI2K4.GUI2K4QuestionPage"))
			{
				QPage=GUIQuestionPage(Controller.TopPage());
				QPage.SetupQuestion(repl(repl(CantAffordCancel, "%cancelpenalty%", GP.MoneyToString(CancelPenalty)), "%balance%", GP.MoneyToString(GP.Balance)), QBTN_Ok, QBTN_Ok);
			}
	    }
		else if (Controller.OpenMenu("GUI2K4.GUI2K4QuestionPage"))
		{
			QPage=GUIQuestionPage(Controller.TopPage());
			QPage.SetupQuestion(repl(PenaltyWarning, "%cancelpenalty%", GP.MoneyToString(CancelPenalty)), QBTN_YesNo, QBTN_No);
			QPage.OnButtonClick = OnConfirmCancel;
		}
		return false;
	}
	return true;
}

function UpdateDetails(GUIComponent Sender)
{
	lblSelCharName.Caption = clSelChar.GetName();
	if (cbMap1.bChecked) setChallengeInfo(0);
	else if (cbMap2.bChecked) setChallengeInfo(1);
}

function UpdateEnemyTeam(GUIComponent Sender)
{
	local array<string> Roster;
	local class<UT2K4TeamRoster> ETI;
	if (!GP.GetAltTeamRoster(cbEnemyTeam.GetExtra(), Roster))
	{
		ETI = class<UT2K4TeamRoster>(DynamicLoadObject(cbEnemyTeam.GetExtra(), class'Class'));
		Roster = ETI.default.RosterNames;
	}
	if (!bChallenged)
	{
		Roster.Remove(0, 1);
		clSelChar.PopulateList(Roster);
		clSelChar.SetIndex(Max(clSelChar.Index, 0));
	}
	UpdateDetails(Sender);
}

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

event SetVisibility(bool bIsVisible)
{
	Super.SetVisibility(bIsVisible);
	if ( imgMap1 != None )
	{
		imgMap1.SetVisibility(imgMap1.Image != None);
		if ( lblNoPreview1 != None ) lblNoPreview1.SetVisibility(imgMap1.Image == None);
	}
	if ( imgMap2 != None )
	{
		imgMap2.SetVisibility(imgMap2.Image != None);
		if ( lblNoPreview2 != None ) lblNoPreview2.SetVisibility(imgMap2.Image == None);
	}
}

protected function SetupNoPreview( GUILabel lbl, GUIImage img )
{
	if ( lbl == None || img == None ) return;
	lbl.WinLeft   = img.WinLeft;
	lbl.WinTop    = img.WinTop;
	lbl.WinWidth  = img.WinWidth;
	lbl.WinHeight = img.WinHeight;
}

function bool XButtonClicked( GUIComponent Sender )
{
	Controller.CloseMenu(true);
	return true;
}

DefaultProperties
{
	Begin Object Class=GUIButton Name=SPMbtnOk
		Caption="ACCEPT"
		WinWidth=0.222222
		WinHeight=0.050694
		WinLeft=0.741321
		WinTop=0.912731
		OnClick=onOkClick
		RenderWeight=0.2
		FontScale=FNS_Small
		TabOrder=1
		MenuState=MSAT_Disabled
		bBoundToParent=true
	End Object
	btnOk=SPMbtnOk

	Begin Object Class=GUIButton Name=SPCbtnCancel
		Caption="REFUSE"
		WinWidth=0.222222
		WinHeight=0.050694
		WinLeft=0.037848
		WinTop=0.912731
		OnClick=onCancelClick
		RenderWeight=0.2
		FontScale=FNS_Small
		TabOrder=2
		bBoundToParent=true
	End Object
	btnCancel=SPCbtnCancel

	Begin Object Class=GUILabel Name=SPClblTitle
		Caption="Bloodrites"
		WinWidth=0.862501
		WinHeight=0.077500
		WinLeft=0.067813
		WinTop=0.026180
		RenderWeight=0.2
		StyleName="TextLabel"
		FontScale=FNS_Large
		TextALign=TXTA_Center
		bBoundToParent=true
	End Object
	lblTitle=SPClblTitle

	Begin Object class=GUIImage name=SPCimgMapBg1
		WinWidth=0.444444
		WinHeight=0.333333
		WinLeft=0.020833
		WinTop=0.111308
		RenderWeight=0.1
		Image=Material'2K4Menus.Controls.sectionback'
		ImageStyle=ISTY_Scaled
		bBoundToParent=true
	End Object
	imgMapBg1=SPCimgMapBg1

	Begin Object class=GUIImage name=SPCimgMapBg2
		WinWidth=0.444444
		WinHeight=0.333333
		WinLeft=0.534722
		WinTop=0.111308
		RenderWeight=0.1
		Image=Material'2K4Menus.Controls.sectionback'
		ImageStyle=ISTY_Scaled
		bBoundToParent=true
	End Object
	imgMapBg2=SPCimgMapBg2

	Begin Object class=GUIImage name=SPCimgMap1
		WinWidth=0.441667
		WinHeight=0.312500
		WinLeft=0.022222
		WinTop=0.122531
		RenderWeight=0.15
		Image=Material'2K4Menus.Controls.sectionback'
		ImageStyle=ISTY_Scaled
		bBoundToParent=true
	End Object
	imgMap1=SPCimgMap1

	Begin Object class=GUIImage name=SPCimgMap2
		WinWidth=0.441667
		WinHeight=0.312500
		WinLeft=0.536111
		WinTop=0.122531
		RenderWeight=0.15
		Image=Material'2K4Menus.Controls.sectionback'
		ImageStyle=ISTY_Scaled
		bBoundToParent=true
	End Object
	imgMap2=SPCimgMap2

	Begin Object class=GUIGFXButton Name=SPCcbMap1
		Caption=""
		WinWidth=0.444444
		WinHeight=0.062500
		WinLeft=0.020833
		WinTop=0.452974
		bCheckBox=true
		OnChange=OnMapSelect
		bBoundToParent=true
	End Object
	cbMap1=SPCcbMap1

	Begin Object class=GUIGFXButton Name=SPCcbMap2
		Caption=""
		WinWidth=0.444444
		WinHeight=0.062500
		WinLeft=0.534722
		WinTop=0.452974
		bCheckBox=true
		OnChange=OnMapSelect
		bBoundToParent=true
	End Object
	cbMap2=SPCcbMap2

	Begin Object class=moComboBox Name=SPCcbEnemyTeam
		Caption="Challenge team:"
		Hint="Challenge this team for a match"
		bAutoSizeCaption=true
		WinWidth=0.696528
		WinHeight=0.053472
		WinLeft=0.280556
		WinTop=0.528114
		bReadOnly=true
		TabOrder=3
		OnChange=UpdateEnemyTeam
		bBoundToParent=true
	End Object
	cbEnemyTeam=SPCcbEnemyTeam

	Begin Object class=moCheckBox name=SPCcbInstaGib
		Caption="InstaGib Game"
		Hint="In this an InstaGib Match"
		bAutoSizeCaption=true
		WinWidth=0.696528
		WinHeight=0.053472
		WinLeft=0.280556
		WinTop=0.586447
		TabOrder=4
		OnChange=UpdateEnemyTeam
		bBoundToParent=true
	End Object
	cbInstaGib=SPCcbInstaGib

	Begin Object Class=GUIScrollTextBox Name=SPCsbDetails
		WinWidth=0.689583
		WinHeight=0.243611
		WinLeft=0.282292
		WinTop=0.657976
		RenderWeight=0.2
		TabOrder=1
		bNoTeletype=true
		StyleName="NoBackground"
		bBoundToParent=true
	End Object
	sbDetails=SPCsbDetails

    Begin Object Class=GUILabel Name=NoPreview
        TextFont="UT2HeaderFont"
        TextAlign=TXTA_Center
        VertAlign=TXTA_Center
        bMultiline=True
        bTransparent=False
        TextColor=(R=247,G=255,B=0,A=255)
        Caption="No Preview Available"
		WinWidth=0.441667
		WinHeight=0.312500
		WinLeft=0.022222
		WinTop=0.197531
		bBoundToParent=true
    End Object
    lblNoPreview1=NoPreview
    lblNoPreview2=NoPreview

    // Character selection
    Begin Object class=GUILabel name=CGBlblSelChar
        TextAlign=TXTA_Center
        Caption="Team Mate"
        StyleName="TextLabel"
		WinWidth=0.197917
		WinHeight=0.043750
		WinLeft=0.047222
		WinTop=0.530864
		bBoundToParent=true
    End Object
    lblSelChar=CGBlblSelChar

    Begin Object Class=GUIButton Name=CGBbtnPrevChar
		Hint="Select the team mate you want"
		StyleName="ArrowLeft"
		WinWidth=0.048750
		WinHeight=0.073750
		WinLeft=0.042500
		WinTop=0.673333
		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"
		StyleName="ArrowRight"
		WinWidth=0.048750
		WinHeight=0.073750
		WinLeft=0.203437
		WinTop=0.673333
		bNeverFocus=true
		bRepeatClick=true
		OnClickSound=CS_Up
		OnClick=onSelectChar
		bBoundToParent=true
	End Object
	btnNextChar=CGBbtnNextChar

	Begin Object class=GUICharacterListTeam Name=CGBclSelChar
		Hint="Challenge for this team mate"
		WinWidth=0.118444
		WinHeight=0.268750
		WinLeft=0.088462
		WinTop=0.576250
		bCenterInBounds=true
		FixedItemsPerPage=1
		StyleName="CharButton"
		TabOrder=0
		OnChange=UpdateDetails
		bBoundToParent=true
	End Object
	clSelChar=CGBclSelChar

	Begin Object class=GUILabel name=CGBlblSelCharName
        TextAlign=TXTA_Center
        Caption=""
        StyleName="TextLabel"
		WinWidth=0.222917
		WinHeight=0.043750
		WinLeft=0.037222
		WinTop=0.847530
		bBoundToParent=true
    End Object
    lblSelCharName=CGBlblSelCharName

    Begin Object Class=GUILabel Name=SPLlblBalance
		WinWidth=0.450000
		WinHeight=0.041250
		WinLeft=0.532360
		WinTop=0.042037
		Caption=""
		StyleName="TextLabel"
		TextAlign=TXTA_Right
		RenderWeight=0.25
		bBoundToParent=true
	End Object
	lblBalance=SPLlblBalance

	DefaultLeft=0.05
	DefaultTop=0.05
	DefaultWidth=0.9
	DefaultHeight=0.9

	WinLeft=0.05
	WinTop=0.05
	WinWidth=0.9
	WinHeight=0.9

	OnClose=OnWindowClose
	OnCanClose=OnCanWindowClose

	PenaltyWarning="When you refuse you will have to pay a penalty of %cancelpenalty%.||Are you sure you want to refuse?"
	CantAffordCancel="You can't afford to refuse this challenge.|You have to pay %cancelpenalty% to refuse, but you only have %balance%."
	SelectAMap="Please select an area for the challenge."
	msgChallenge="You have selected to challenge %enemyteam% for their team mate %selectedchar%. In order to challenge %enemyteam% for one of their team members you will have to pay %entryfee%. The %gametype% will take place in %map%."
	msgChallenged="You have been challenged by %enemyteam%. They are challenging you for your team member %selectedchar%. The %gametype% will take place in %map%.|When you refuse you will have to pay them %penalty%"
    msgInstaGib="InstaGib"

	DefaultUrl="?TeamScreen=true"
	ChalGameType="xGame.xTeamGame"
	MutInstaGib="?mutator=xGame.MutInstaGib"
	InstaGoalScore=35
	NormalGoalScore=25
	MapPreFix="DM"
	ChalledFeeMultiply=2
}

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.972 - Created with UnCodeX