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

GUI2K4.UT2K4MainPage


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
//====================================================================
//  Base class for all main menu pages.
//
//  Written by Ron Prestenback
//  (c) 2003, Epic Games, Inc.  All Rights Reserved
// ====================================================================
class UT2K4MainPage extends UT2K4GUIPage;

var automated GUITabControl     c_Tabs;

var automated GUIHeader         t_Header;
var automated ButtonFooter      t_Footer;
var automated BackgroundImage   i_Background;

var automated	GUIImage 	    i_bkChar, i_bkScan;

/** file where the higscores are stored */
var string HighScoreFile;
var private globalconfig string TotalUnlockedCharacters;

var array<string>               PanelClass;
var localized array<string>     PanelCaption;
var localized array<string>     PanelHint;



function InitComponent(GUIController MyC, GUIComponent MyO)
{
	Super.InitComponent(MyC, MyO);

	c_Tabs.MyFooter = t_Footer;
	t_Header.DockedTabs = c_Tabs;
}

function InternalOnChange(GUIComponent Sender);
/*
event Opened(GUIComponent Sender)
{
	Super.Opened(Sender);

	if ( bPersistent && c_Tabs != None && c_Tabs.FocusedControl == None )
		c_Tabs.SetFocus(None);
}
*/

function HandleParameters(string Param1, string Param2)
{
	if ( Param1 != "" )
	{
		if ( c_Tabs != none )
			c_Tabs.ActivateTabByName(Param1, True);
	}
}

function bool GetRestoreParams( out string Param1, out string Param2 )
{
	if ( c_Tabs != None && c_Tabs.ActiveTab != None )
	{
		Param1 = c_Tabs.ActiveTab.Caption;
		return True;
	}

	return False;
}

static function bool UnlockCharacter( string CharName )
{
	local int i;
	local array<string> Unlocked;

	if ( CharName == "" )
		return false;

	Split(default.TotalUnlockedCharacters, ";", Unlocked);
	for ( i = 0; i < Unlocked.Length; i++ )
		if ( Unlocked[i] ~= CharName )
			return false;

	Unlocked[Unlocked.Length] = CharName;

	default.TotalUnlockedCharacters = JoinArray(Unlocked, ";", True);
	StaticSaveConfig();
	return true;
}

// Caution: you must verify that the specified CharName is a locked character by default, before calling this function
static function bool IsUnlocked( string CharName )
{
	return CharName != "" && (InStr(";" $ Caps(default.TotalUnlockedCharacters) $ ";", ";" $ Caps(CharName) $ ";") != -1);
}

defaultproperties
{
	Begin Object Class=GUITabControl Name=PageTabs
		WinWidth=0.98
		WinLeft=0.01
		WinTop=0.0
		WinHeight=0.04
		TabHeight=0.04
		TabOrder=3
		RenderWeight=0.49
		bFillSpace=False
		bAcceptsInput=True
		bDockPanels=True
		OnChange=InternalOnChange
		BackgroundStyleName="TabBackground"
	End Object

	Begin Object Class=BackgroundImage Name=PageBackground
//        Image=material'2K4Menus.Controls.menuBackground'
		ImageStyle=ISTY_PartialScaled
		Image=Material'2K4Menus.BKRenders.bgndTile'
		X1=0
		Y1=0
		X2=4
		Y2=768
		RenderWeight=0.01
	End Object

	Begin Object Class=BackgroundImage Name=PageScanLine
		ImageStyle=ISTY_Tiled
		Image=Material'2K4Menus.BKRenders.ScanLines'
		ImageRenderStyle=MSTY_Alpha
		ImageColor=(R=255,G=255,B=255,A=32)
		WinWidth=1.0
		WinHeight=1.0
		WinLeft=0.0
		WinTop=0.0
		X1=0
		Y1=0
		X2=32
		Y2=32
		RenderWeight=0.03
	End Object

	Begin Object Class=GUIImage Name=BkChar
		Image=material'2K4Menus.BKRenders.Char01'
		ImageStyle=ISTY_Scaled
		ImageColor=(R=255,G=255,B=255,A=255)
		X1=0
		Y1=0
		X2=1024
		Y2=768
		WinWidth=1
		WinHeight=1
		WinTop=0
		WinLeft=0
		RenderWeight=0.02
	End Object

	WinWidth=1.0
	WinHeight=1.0
	WinLeft=0.0
	WinTop=0.0

	bRenderWorld=False
	bRequire640x480=True
	bPersistent=True
	bRestorable=True

	Background=none
	i_bkScan=PageScanLine
	i_Background=PageBackground
	i_BkChar=BkChar
	c_Tabs=PageTabs
	HighScoreFile="UT2004HighScores"
}

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