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

ProUI.ProInstantAction


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
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================

class ProInstantAction extends UT2K3GUIPage
	Config(ProUI);

#exec OBJ LOAD FILE=InterfaceContent.utx

var Pro_InstantActionMain 		pMain;
var Pro_PlayerSettings			pPlayerSetup;

var GUITabControl				MyTabs;

var localized string			MainTabLabel,
								MainTabHint,
								PlayerTabLabel,
								PlayerTabHint;


var config string GameRules;

function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
	Super.Initcomponent(MyController, MyOwner);

	MyTabs = GUITabControl(Controls[1]);
	GUITitleBar(Controls[0]).DockedTabs = MyTabs;

	pMain 		 = Pro_InstantActionMain(MyTabs.AddTab(MainTabLabel,"proui.Pro_InstantActionMain",,MainTabHint,true) );
	pPlayerSetup = Pro_PlayerSettings(MyTabs.AddTab(PlayerTabLabel,"proui.Pro_PlayerSettings",,PlayerTabHint));
	MyTabs.bDockPanels=true;

}

function bool BackButtonClick(GUIComponent Sender)
{
	pPlayerSetup.InternalApply(none);
	Controller.CloseMenu(true);
	return true;
}

function bool PlayButtonClick(GUIComponent Sender)
{
	local string FullURL, GameURL, FirstMap, GameType;

	pPlayerSetup.InternalApply(none);

	GameURL = pMain.Play() $ GameRules;

	FirstMap = pMain.MyMapList.List.Get();
	GameType = "?Game="$pMain.GetGameClass();

	FullURL = FirstMap$GameType$GameURL;


	log("["$FirstMap$"] ["$GameType$"]"@FullURL);

	log("UT2InstantActionPage::PlayButtonClick - Sending [open"@FUllURL$"] to the console");
	Console(Controller.Master.Console).DelayedConsoleCommand("start"@FullURL);
	Controller.CloseAll(false);
	return true;
}


function TabChange(GUIComponent Sender)
{
	if (GUITabButton(Sender)==none)
		return;

	GUITitleBar(Controls[0]).Caption = GUITitleBar(default.Controls[0]).Caption@"|"@GUITabButton(Sender).Caption;
}

event ChangeHint(string NewHint)
{
	GUITitleBar(Controls[2]).Caption = NewHint;
}


function InternalOnClose(optional Bool bCanceled)
{
	// Destroy spinning player model actor
	if(pPlayerSetup.SpinnyDude != None)
		pPlayerSetup.SpinnyDude.Destroy();

	Super.OnClose(bCanceled);
}

defaultproperties
{
	Begin Object class=GUITitleBar name=IAPageHeader
		Caption="Instant Action"
		StyleName="Header"
		WinWidth=1
		WinHeight=46.000000
		WinLeft=0
		WinTop=0.036406
		Effect=material'CO_Final'
	End Object
	Controls(0)=GUITitleBar'IAPageHeader'

	Begin Object Class=GUITabControl Name=IAPageTabs
		WinWidth=1.0
		WinLeft=0
		WinTop=0.25
		WinHeight=48
		TabHeight=0.04
		OnChange=TabChange;
		bAcceptsInput=true
	End Object
	Controls(1)=GUITabControl'IAPageTabs'

	Begin Object class=GUITitleBar name=IAPageFooter
		WinWidth=0.76
		WinHeight=0.055
		WinLeft=0.12
		WinTop=0.93
		bUseTextHeight=false
		StyleName="Footer"
		Justification=TXTA_Center
	End Object
	Controls(2)=GUITitleBar'IAPageFooter'

	Begin Object Class=GUIButton Name=IAPagePlayButton
		Caption="PLAY"
		Hint="Start a Match With These Settings"
		OnClick=PlayButtonClick
		StyleName="SquareMenuButton"
		WinWidth=0.12
		WinHeight=0.055
		WinLeft=0.88
		WinTop=0.93
	End Object
	Controls(3)=GUIButton'IAPagePlayButton'

	Begin Object Class=GUIButton Name=IAPageBackButton
		Caption="BACK"
		Hint="Return to Previous Menu"
		OnClick=BackButtonClick
		StyleName="SquareMenuButton"
		WinWidth=0.12
		WinHeight=0.055
		WinLeft=0
		WinTop=0.93
	End Object
	Controls(4)=GUIButton'IAPageBackButton'
	OnClose=InternalOnClose

	Background=Material'InterfaceContent.Backgrounds.bg09'
	WinWidth=1.0
	WinHeight=1.0
	WinTop=0.0
	WinLeft=0.0

	MainTabLabel="Select Map"
	PlayerTabLabel="Player"

	MainTabHint="Choose the starting map and game type to play..."
	PlayerTabHint="Configure your UT2003 Avatar..."
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Thu 1/12/2005 14:17:16.000 - Creation time: Mon 5/5/2025 20:56:15.062 - Created with UnCodeX