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

UMenu.UMenuStartGameClientWindow


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
class UMenuStartGameClientWindow extends UMenuBotmatchClientWindow;

// Window
var UWindowSmallButton DedicatedButton;
var localized string DedicatedText;
var localized string DedicatedHelp;
var localized string ServerText;

var UWindowPageControlPage ServerTab;

function Created()
{
	Super.Created();

	// Dedicated
	DedicatedButton = UWindowSmallButton(CreateControl(class'UWindowSmallButton', WinWidth-156, WinHeight-24, 48, 16));
	DedicatedButton.SetText(DedicatedText);
	DedicatedButton.SetHelpText(DedicatedHelp);

	ServerTab = Pages.AddPage(ServerText, class'UMenuServerSetupSC');
}

function Resized()
{
	Super.Resized();
	DedicatedButton.WinLeft = WinWidth-152;
	DedicatedButton.WinTop = WinHeight-20;
}

function Notify(UWindowDialogControl C, byte E)
{
	switch (E)
	{
	case DE_Click:
		switch (C)
		{
		case DedicatedButton:
			DedicatedPressed();
			return;
		default:
			Super.Notify(C, E);
			return;
		}
	default:
		Super.Notify(C, E);
		return;
	}
}

function DedicatedPressed()
{
	local string URL;
	local string LanPlay;

	if (UMenuServerSetupPage(UMenuServerSetupSC(ServerTab.Page).ClientArea).bLanPlay)
		LanPlay = " -lanplay";

	URL = Map $ "?Game="$GameType$"?Mutator="$Class'UMenuMutatorCW'.Default.MutatorList $ "?Listen";

	ParentWindow.Close();
	Root.Console.CloseUWindow();
	GetPlayerOwner().ConsoleCommand("RELAUNCH "$URL$LanPlay$" -server log="$GameClass.Default.ServerLogName);
}

// Override botmatch's start behavior
function StartPressed()
{
	// Reset the game class.
	GameClass.Static.ResetGame();

	ParentWindow.Close();
	Root.Console.CloseUWindow();
	GetPlayerOwner().ClientTravel(Map$"?Game="$GameType$"?Mutator="$Class'UMenuMutatorCW'.Default.MutatorList$"?Listen", TRAVEL_Absolute, false);
}

defaultproperties
{
				DedicatedText="Dedicated"
				DedicatedHelp="Press to launch a dedicated server."
				ServerText="Server"
				Map="Real_LavaGiant.unr"
				GameType="RealCTF.RealTeamGame"
				bNetworkGame=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: zo 11-11-2012 21:10:30.000 - Creation time: zo 11-11-2012 21:14:21.756 - Created with UnCodeX