Prepare fixtures

This commit is contained in:
dkanus 2026-07-14 20:27:09 +07:00
commit 9c94356263
6021 changed files with 722805 additions and 22 deletions

View file

@ -0,0 +1,44 @@
//==============================================================================
// Created on: 11/12/2003
// Base class for admin controls
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class AdminPanelBase extends GUIPanel;
var() localized string PanelCaption;
var() noexport bool bAdvancedAdmin;
function bool IsAdmin()
{
return PlayerOwner() != None && PlayerOwner().PlayerReplicationInfo != None && PlayerOwner().PlayerReplicationInfo.bAdmin;
}
function AdminCommand( string Command )
{
if ( PlayerOwner() != None )
PlayerOwner().AdminCommand(Command);
}
function LoggedIn( string AdminName );
function LoggedOut();
function SetAdvanced( bool bIsAdvanced )
{
bAdvancedAdmin = bIsAdvanced;
}
function AdminReply(string Reply);
function ShowPanel();
DefaultProperties
{
WinWidth=1.000000
WinHeight=0.862502
WinLeft=0.000000
WinTop=0.131250
bScaleToParent=True
bBoundToParent=True
}

View file

@ -0,0 +1,220 @@
//==============================================================================
// Created on: 11/12/2003
// Default screen that appears until successfully logged in
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class AdminPanelLogin extends AdminPanelBase
config(LoginCache);
var() config bool bStoreLogins;
var() config array<AutoLoginInfo> LoginHistory;
var() localized string WaitingForLoginText, LoggedText;
var automated moEditBox ed_LoginName, ed_LoginPassword;
var automated GUIButton b_Login, b_Logout;
var automated GUILabel l_Status;
var() editconst noexport string CurrentIP, CurrentPort;
function InitComponent( GUIController C, GUIComponent O )
{
local PlayerController PC;
local string str;
local int i;
Super.InitComponent(C, O);
PC = PlayerOwner();
str = PC.GetServerNetworkAddress();
if ( str != "" )
{
if ( !Divide(str, ":", CurrentIP, CurrentPort) )
{
CurrentIP = str;
CurrentPort = "7777";
}
}
i = FindCredentials(CurrentIP, CurrentPort);
if ( i != -1 )
{
ed_Loginname.SetText(LoginHistory[i].Username);
ed_LoginPassword.SetText(LoginHistory[i].Password);
if ( LoginHistory[i].bAutoLogin )
InternalOnClick(b_Login);
}
}
protected function UpdateStatus(string NewStatusMsg )
{
l_Status.Caption = NewStatusMsg;
}
function bool InternalOnClick(GUIComponent Sender)
{
local PlayerController PC;
local string cmd, uname, upass;
PC = PlayerOwner();
if ( PC == None )
return true;
if ( Sender == b_Login )
{
cmd = "AdminLogin";
uname = ed_LoginName.GetText();
upass = ed_LoginPassword.GetText();
UpdateStatus(WaitingForLoginText);
}
else if ( Sender == b_Logout )
cmd = "AdminLogout";
if ( uname != "" )
cmd @= uname;
if ( upass != "" )
cmd @= upass;
AdminCommand(cmd);
return true;
}
function LoggedIn( string AdminName )
{
DisableComponent(b_Login);
DisableComponent(ed_LoginName);
DisableComponent(ed_LoginPassword);
EnableComponent(b_Logout);
UpdateStatus(Repl(LoggedText, "%name%", AdminName));
SaveCredentials();
}
function LoggedOut()
{
DisableComponent(b_Logout);
EnableComponent(b_Login);
EnableComponent(ed_LoginName);
EnableComponent(ed_LoginPassword);
UpdateStatus("");
}
protected function int FindCredentials( coerce string IP, coerce string Port )
{
local int i;
for ( i = 0; i < LoginHistory.Length; i++ )
if ( LoginHistory[i].IP == IP && LoginHistory[i].Port == Port )
return i;
return -1;
}
protected function SaveCredentials()
{
local AutoLoginInfo NewInfo;
local int i;
if ( !bStoreLogins )
return;
NewInfo.UserName = ed_LoginName.GetText();
NewInfo.Password = ed_LoginPassword.GetText();
if ( NewInfo.Password == "" )
return;
NewInfo.IP = CurrentIP;
NewInfo.Port = CurrentPort;
i = FindCredentials(NewInfo.IP, NewInfo.Port);
if ( i == -1 )
i = LoginHistory.Length;
LoginHistory[i] = NewInfo;
SaveConfig();
}
DefaultProperties
{
PanelCaption="Login"
WaitingForLoginText="Please wait while your login credentials are verified..."
Begin Object Class=GUILabel Name=StatusLabel
WinWidth=0.992189
WinHeight=0.407813
WinLeft=0.005312
WinTop=0.585417
StyleName="TextLabel"
bMultiLine=True
TextAlign=TXTA_Center
VertAlign=TXTA_Left
FontScale=FNS_Large
End Object
l_Status=StatusLabel
Begin Object Class=moEditBox Name=LoginNameEditbox
WinWidth=0.895312
WinHeight=0.098438
WinLeft=0.089063
WinTop=0.091667
bScaleToParent=True
bBoundToParent=True
Caption="Login Name: "
Hint="Enter your admin username"
ComponentWidth=-1
CaptionWidth=0.2
bAutoSizeCaption=True
LabelJustification=TXTA_Right
End Object
ed_LoginName=LoginNameEditBox
Begin Object Class=moEditBox Name=LoginPasswordEditBox
WinWidth=0.970312
WinHeight=0.098437
WinLeft=0.014062
WinTop=0.236667
bScaleToParent=True
bBoundToParent=True
Caption="Login Password: "
Hint="Enter your admin password"
ComponentWidth=-1
CaptionWidth=0.2
bAutoSizeCaption=True
bMaskText=True
LabelJustification=TXTA_Right
End Object
ed_LoginPassword=LoginPasswordEditBox
Begin Object Class=GUIButton Name=LoginButton
WinWidth=0.286607
WinHeight=0.092188
WinLeft=0.360938
WinTop=0.418750
bScaleToParent=True
bBoundToParent=True
OnClick=InternalOnClick
Caption="LOGIN"
End Object
b_Login=LoginButton
Begin Object Class=GUIButton Name=LogoutButton
WinWidth=0.286607
WinHeight=0.092188
WinLeft=0.360938
WinTop=0.418750
bScaleToParent=True
bBoundToParent=True
OnClick=InternalOnClick
Caption="LOGOUT"
End Object
b_Logout=LogoutButton
}

View file

@ -0,0 +1,84 @@
//==============================================================================
// Created on: 11/12/2003
// Contains controls for administering maps & maplists
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class AdminPanelMaps extends AdminPanelBase;
var automated GUIListBoxBase lb_Maps;
var bool bReceivedMaps;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.InitComponent(MyController, MyOwner);
lb_Maps.NotifyContextSelect = HandleContextSelect;
lb_Maps.ContextMenu.ContextItems.Remove(1, lb_Maps.ContextMenu.ContextItems.Length - 1);
}
function ShowPanel()
{
Super.ShowPanel();
if ( !bReceivedMaps )
RefreshMaplist();
}
function RefreshMaplist()
{
bReceivedMaps = False;
SetTimer(3.0,True);
Timer();
}
function Timer()
{
if ( bReceivedMaps || xPlayer(PlayerOwner()) == None )
{
KillTimer();
return;
}
xPlayer(PlayerOwner()).ProcessMapName = ProcessMapName;
xPlayer(PlayerOwner()).ServerRequestMapList();
}
function ProcessMapName(string NewMap)
{
GUIList(lb_Maps.MyList).Add(NewMap);
}
function bool HandleContextSelect(GUIContextMenu Sender, int Index)
{
local string MapName;
if ( Sender != None )
{
MapName = GUIList(lb_Maps.MyList).Get();
if (MapName != "")
Console(Controller.Master.Console).DelayedConsoleCommand("open"@MapName);
Controller.CloseAll(False,True);
}
return true;
}
defaultproperties
{
Begin Object class=MaplistBox Name=Maplist
WinWidth=1.000000
WinHeight=0.834375
WinLeft=0.000000
WinTop=0.143750
bVisibleWhenEmpty=True
bBoundToParent=True
bScaleToParent=True
StyleName="NoBackground"
End Object
lb_Maps=Maplist
PanelCaption="Maps"
}

View file

@ -0,0 +1,111 @@
//==============================================================================
// Created on: 11/12/2003
// Contains controls for administering players on the server (kick/ban)
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class AdminPanelPlayers extends AdminPanelBase;
var automated GUIMultiColumnListbox lb_Players;
var AdminPlayerList li_Players;
var automated GUIButton b_Kick, b_Ban;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.InitComponent(MyController,MyOwner);
li_Players = AdminPlayerList(lb_Players.List);
}
function ProcessPlayer(string PlayerInfo)
{
if (PlayerInfo=="Done")
XPlayer(PlayerOwner()).ProcessRule = None;
else li_Players.Add(PlayerInfo);
}
function ReloadList()
{
local xPlayer PC;
PC = xPlayer(PlayerOwner());
if ( PC == None )
return;
li_Players.Clear();
PC.ProcessRule = ProcessPlayer;
PC.ServerRequestPlayerInfo();
}
function bool InternalOnClick(GUIComponent Sender)
{
switch ( Sender )
{
case b_Kick:
if ( bAdvancedAdmin )
AdminCommand( "kick"@li_Players.MyPlayers[li_Players.Index].PlayerID );
else AdminCommand( "kick"@li_Players.MyPlayers[li_Players.Index].PlayerName );
ReloadList();
return true;
case b_Ban:
if ( bAdvancedAdmin )
AdminCommand( "kick ban"@li_Players.MyPlayers[li_Players.Index].PlayerID );
else AdminCommand( "kickban"@li_Players.MyPlayers[li_Players.Index].PlayerName);
ReloadList();
return true;
}
}
defaultproperties
{
Begin Object Class=GUIMultiColumnListBox Name=AdminPlayersListBox
WinWidth=1.000000
WinHeight=0.878127
WinLeft=0.000000
WinTop=0.000000
bVisibleWhenEmpty=True
StyleName="ServerBrowserGrid"
DefaultListClass="XInterface.AdminPlayerList"
bBoundToParent=True
bScaleToParent=True
End Object
lb_Players=AdminPlayersListBox
Begin Object Class=GUIButton Name=KickButton
Caption="Kick"
Hint="Kick this Player"
WinWidth=0.120000
WinHeight=0.070625
WinLeft=0.743750
WinTop=0.900000
OnClick=InternalOnClick
bBoundToParent=True
bScaleToParent=True
End Object
b_Kick=KickButton
Begin Object Class=GUIButton Name=BanButton
Caption="Ban"
Hint="Ban this player"
WinWidth=0.120000
WinHeight=0.070625
WinLeft=0.868750
WinTop=0.900000
OnClick=InternalOnClick
bBoundToParent=True
bScaleToParent=True
End Object
b_Ban=BanButton
WinLeft=0
WinWidth=1
WinTop=0
WinHeight=0.625003
PanelCaption="Players"
}

View file

@ -0,0 +1,17 @@
//==============================================================================
// Created on: 11/23/2003
// Playinfo stuff
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class AdminPanelRules extends AdminPanelBase;
var automated RemotePlayInfoPanel p_Main;
DefaultProperties
{
Begin Object Class=RemotePlayInfoPanel Name=PlayInfoPanel
End Object
p_Main=PlayInfoPanel
}

View file

@ -0,0 +1,22 @@
//-----------------------------------------------------------
//
//-----------------------------------------------------------
class AltSectionBackground extends GUISectionBackground;
DefaultProperties
{
HeaderBase=Texture'KF_InterfaceArt_tex.Menu.Thin_border_SlightTransparent'
HeaderTop=Texture'InterfaceArt_tex.Menu.empty'
HeaderBar=Texture'InterfaceArt_tex.Menu.empty'
bAltCaption=true
AltCaptionOffset(0)=40
AltCaptionOffset(1)=8
AltCaptionOffset(2)=40
AltCaptionOffset(3)=25
AltCaptionAlign=TXTA_Center
FontScale=FNS_Medium
}

View file

@ -0,0 +1,125 @@
//==============================================================================
// Created on: 10/18/2003
// This specialized menu-option only displays the editbox when this component is focused
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class AnimatedEditBox extends moEditBox;
// Controls how quickly the component slides open & closed
var() float Increment;
// Should the caption be the same as the value?
var() bool bUseValueForCaption;
var() noexport editconst protected bool bUpdated;
function bool InternalOnPreDraw( Canvas C )
{
CaptionWidth += Increment;
// Set caret position so that all text will be visible
MyEditBox.CaretPos = 0;
// If we've arrived, unhook predraw
if ( CaptionWidth <= 0.0 || CaptionWidth >= 1.0 )
OnPreDraw = None;
return true;
}
function SetText( string Str )
{
Super.SetText(Str);
if ( bUseValueForCaption )
SetCaption(MyEditBox.GetText());
}
function InternalOnActivate()
{
ShowEditBox();
}
function InternalOnDeactivate()
{
ShowLabel();
if ( bUpdated )
InternalOnChange(Self);
bUpdated = False;
}
function ShowEditBox()
{
if ( CaptionWidth > 0.0 )
{
// Increment must be negative
if ( Increment > 0.0 )
Increment *= -1.0;
OnPreDraw = InternalOnPreDraw;
}
}
function ShowLabel()
{
if ( CaptionWidth < 1.0 )
{
// Increment must be a positive number
if ( Increment < 0.0 )
Increment *= -1.0;
OnPreDraw = InternalOnPreDraw;
}
}
function InternalOnChange(GUIComponent Sender)
{
if (Controller.bCurMenuInitialized)
{
if ( Sender != Self )
bUpdated = True;
// If InternalOnChange() was called manually, or we're receiving a call to OnChange() as a result of a call to SetText()
if ( Sender == Self || MenuState != MSAT_Focused )
{
if ( !bIgnoreChange )
{
if ( bUseValueForCaption )
SetCaption(MyEditBox.GetText());
OnChange(Self);
}
}
}
bIgnoreChange = False;
}
/*
function InternalOnMousePressed(GUIComponent Sender, bool IsRepeat)
{
// Set bCaptureMouse so that we receive the MouseRelease instead of MyComponent
bCaptureMouse = True;
}
function InternalOnMouseRelease(GUIComponent Sender)
{
bCaptureMouse = False;
}
*/
DefaultProperties
{
Increment=0.1
bAutoSizeCaption=False
CaptionWidth=1.0
ComponentWidth=-1
// OnMousePressed=InternalOnMousePressed
// OnMouseRelease=InternalOnMouseRelease
OnActivate=InternalOnActivate
OnDeactivate=InternalOnDeactivate
}

View file

@ -0,0 +1,14 @@
//==============================================================================
// Created on: 10/10/2003
// Base class for message windows which do not allow the menus beneath it to be viewed
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class BlackoutWindow extends MessageWindow;
DefaultProperties
{
bRequire640x480=False
OpenSound=sound'KF_MenuSnd.msfxEdit'
}

View file

@ -0,0 +1,380 @@
//==============================================================================
// GUI-wide filter manager - this class provides interaction with filter information
// across all components that access filters
//
// Created by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class BrowserFilters extends Object
Within UT2K4ServerBrowser
DependsOn(CustomFilter)
Config(User);
var() config string CustomFilterClass;
var class<CustomFilter> FilterClass;
var bool bInvalidFilterClass; // Used to tell when we cannot use filters
var transient array<CustomFilter> AllFilters, Deleted;
//
// Custom Filter Management
//
// Create all filter classes
function InitCustomFilters()
{
local int i;
local CustomFilter Temp;
local array<string> CustomFilterNames;
if ( AllFilters.Length > 0 )
AllFilters.Remove(0, AllFilters.Length);
if (FilterClass == None)
FilterClass = class<CustomFilter>(DynamicLoadObject(CustomFilterClass, class'Class'));
if (FilterClass == None)
{
Warn("Invalid custom filter class specified:"@CustomFilterClass);
bInvalidFilterClass = True;
return;
}
// Restore any filters that were deleted (would happen if filters were deleted, but changes weren't applied)
for ( i = 0; i < Deleted.Length; i++ )
Deleted[i].Save(True);
if ( Deleted.Length > 0 )
Deleted.Remove(0, Deleted.Length);
CustomFilterNames = GetPerObjectNames( "ServerFilters", GetItemName(CustomFilterClass) );
for (i = 0; i < CustomFilterNames.Length && i < 1000; i++)
{
Temp = CreateFilter( CustomFilterNames[i] );
AllFilters[AllFilters.Length] = Temp;
}
}
protected function CustomFilter CreateFilter( string FilterName )
{
if ( !ValidName(FilterName) )
return None;
return new(None, Repl( FilterName, " ", Chr(27))) FilterClass;
}
function bool AddCustomFilter(out string NewFilterName)
{
local int i;
local string Str;
local CustomFilter NewFilter;
if ( !ValidName(NewFilterName) )
return false;
Str = NewFilterName;
while ( HasFilterNamed(NewFilterName) )
NewFilterName = Str $ i++;
NewFilter = CreateFilter( NewFilterName );
if ( NewFilter == None )
return false;
NewFilter.SetTitle(NewFilterName);
AllFilters[AllFilters.Length] = NewFilter;
return true;
}
function bool CopyFilter( int Index, out string NewFilterName )
{
local int i;
if ( ValidIndex(Index) && AddCustomFilter(NewFilterName) )
{
i = FindFilterIndex(NewFilterName);
AllFilters[i].ImportFilter( AllFilters[Index] );
AllFilters[i].SetTitle(NewFilterName);
return true;
}
return false;
}
function bool RemoveFilter(string FilterName)
{
local int i;
if (!ValidName(FilterName))
return false;
i = FindFilterIndex(FilterName);
if (i < 0) return false;
return RemoveFilterAt(i);
}
function bool RemoveFilterAt( int Index )
{
Deleted[Deleted.Length] = AllFilters[Index];
AllFilters[Index].ClearConfig();
AllFilters.Remove(Index, 1);
return true;
}
function SaveFilters()
{
local int i;
if ( Deleted.Length > 0 )
Deleted.Remove( 0, Deleted.Length );
for (i = 0; i < AllFilters.Length; i++)
AllFilters[i].Save();
}
function ResetFilters()
{
InitCustomFilters();
}
function bool RenameFilter(int Index, string NewName)
{
local string Str;
local CustomFilter NewFilter;
local int i;
if (!ValidIndex(Index) || !ValidName(NewName))
return false;
Str = NewName;
while ( HasFilterNamed(NewName) )
NewName = Str $ i++;
NewFilter = CreateFilter(NewName);
if ( NewFilter == None )
return false;
NewFilter.ImportFilter( AllFilters[Index] );
NewFilter.SetTitle( NewName );
RemoveFilterAt(Index);
AllFilters.Insert(Index,1);
AllFilters[Index] = NewFilter;
return true;
}
function bool ActivateFilter(int Index, bool Enable)
{
if (!ValidIndex(Index))
return false;
if (IsActive(AllFilters[Index]) == Enable)
return false;
return AllFilters[Index].SetActive(Enable);
}
function bool IsActive(CustomFilter Test)
{
if (Test == None)
return false;
return Test.IsActive();
}
function bool IsActiveAt(int Index)
{
if (!ValidIndex(Index))
return false;
return AllFilters[Index].IsActive();
}
//==============================================================================
//
// Loading / Saving data
//
function LoadSettings(int FilterIndex)
{
}
//==============================================================================
//
// Query functions
//
function string GetFilterName(int Index)
{
if (!ValidIndex(Index))
return "";
return AllFilters[Index].GetTitle();
}
function array<CustomFilter.AFilterRule> GetFilterRules(int Index)
{
local array<CustomFilter.AFilterRule> FilterRules;
if (ValidIndex(Index))
AllFilters[Index].GetQueryRules(FilterRules);
return FilterRules;
}
function array<CustomFilter.CurrentFilter> GetFilterARules(int Index)
{
local array<CustomFilter.CurrentFilter> FilterRules;
if (ValidIndex(Index))
AllFilters[Index].GetRules(FilterRules);
return FilterRules;
}
function PostEdit(int Index, string NewTitle, array<CustomFilter.AFilterRule> NewRules)
{
if (ValidIndex(Index))
AllFilters[Index].PostEdit(NewTitle,NewRules);
}
function array<string> GetFilterNames(optional bool bActiveOnly)
{
local int i;
local array<string> FilterNames;
for (i = 0; i < AllFilters.Length; i++)
{
if ( bActiveOnly && !AllFilters[i].IsActive() )
continue;
FilterNames[i] = AllFilters[i].GetTitle();
}
return FilterNames;
}
//==============================================================================
//
// Assignment functions
//
function SetRule(int FilterIndex, int RuleIndex, string RuleTag, string RuleItem, string RuleValue, string DataType, string QueryType, optional string ExtraData)
{
local int i;
local string Data, MinMax, MinV, MaxV;
local array<string> Ar;
// log(Name@"SetRule FilterIndex:"$FilterIndex@"RuleIndex:"$RuleIndex@"RuleTag:"$RuleTag@"RuleItem:"$RuleItem@"RuleValue:"$RuleValue@"DataType:"$DataType@"QueryType:"$QueryType@"ExtraData:"$ExtraData);
if (ValidIndex(FilterIndex))
{
// Remove the class name
class'CustomFilter'.static.ChopClass(RuleItem);
if (DataType == "DT_Ranged" && ExtraData != "")
{
Divide(ExtraData, ";", Data, MinMax);
FilterInfo.SplitStringToArray(Ar, Data, ",");
if (Ar.Length < 3)
{
Divide(MinMax, ":", MinV, MaxV);
Ar[1] = MinV;
Ar[2] = MaxV;
}
if (RuleValue == "0")
{
if (RuleIndex < 0)
AllFilters[FilterIndex].AddRule(RuleTag, RuleItem, Ar[1], AllFilters[FilterIndex].GetQueryType(QueryType), AllFilters[FilterIndex].GetDataType(DataType));
else AllFilters[FilterIndex].ChangeRule(RuleIndex, RuleTag, Ar[1], AllFilters[FilterIndex].GetQueryType(QueryType));
}
else if (RuleValue == "1")
{
if (RuleIndex < 0)
AllFilters[FilterIndex].AddRule(RuleTag, RuleItem, Ar[2], AllFilters[FilterIndex].GetQueryType(QueryType), AllFilters[FilterIndex].GetDataType(DataType));
else AllFilters[FilterIndex].ChangeRule(RuleIndex, RuleTag, Ar[2], AllFilters[FilterIndex].GetQueryType(QueryType));
}
}
else if (DataType == "DT_Multiple")
{
FilterInfo.SplitStringToArray(Ar, RuleValue, ",");
if (RuleIndex < 0)
{
for (i = 0; i < Ar.Length; i++)
AllFilters[FilterIndex].AddRule(RuleTag, RuleItem, Ar[i], AllFilters[FilterIndex].GetQueryType(QueryType), AllFilters[FilterIndex].GetDataType(DataType));
}
else AllFilters[FilterIndex].ChangeRule(RuleIndex, RuleTag, Ar[0], AllFilters[FilterIndex].GetQueryType(QueryType));
}
else
{
if (RuleIndex < 0)
AllFilters[FilterIndex].AddRule(RuleTag, RuleItem, RuleValue, AllFilters[FilterIndex].GetQueryType(QueryType), AllFilters[FilterIndex].GetDataType(DataType));
else
AllFilters[FilterIndex].ChangeRule(RuleIndex, RuleTag, RuleValue, AllFilters[FilterIndex].GetQueryType(QueryType));
}
}
}
//==============================================================================
//
// Internal functions
//
protected function int AddFilter( CustomFilter Filter )
{
local int i;
if ( Filter == None )
return -1;
i = FindFilterIndex( Filter.GetTitle() );
if ( i == -1 )
AllFilters[AllFilters.Length] = Filter;
return i;
}
protected function bool HasFilterNamed( string FilterName )
{
return FindFilterIndex(FilterName) != -1;
}
function int FindFilterIndex( string FilterName )
{
local int i;
for ( i = 0; i < AllFilters.Length; i++ )
if ( AllFilters[i].GetTitle() ~= FilterName )
return i;
return -1;
}
protected function bool ValidIndex(int Index)
{
return (Index >= 0 && Index < AllFilters.Length && !bInvalidFilterClass);
}
protected function bool ValidName(string Test)
{
return (Test != "" && Len(Test) < 1024 && !bInvalidFilterClass);
}
function int Count()
{
return AllFilters.Length;
}
defaultproperties
{
CustomFilterClass="GUI2K4.CustomFilter"
}

View file

@ -0,0 +1,264 @@
//==============================================================================
// Created on: 01/02/2004
// Base class for top level page footers
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class ButtonFooter extends GUIFooter;
var(Footer) editconst noexport float ButtonLeft;
var(Footer) float ButtonHeight, ButtonWidth, Padding, Margin, Spacer;
var(Footer) bool bFixedWidth, bFullHeight;
var(Footer) bool bAutoSize;
var(Footer) eTextAlign Alignment;
function InitComponent(GUIController InController, GUIComponent InOwner)
{
Super.InitComponent(InController, InOwner);
SetupButtons();
}
function bool InternalOnPreDraw(Canvas C)
{
if ( bBoundToParent && MenuOwner != None )
WinTop = RelativeTop( MenuOwner.ActualTop() + MenuOwner.ActualHeight() - ActualHeight(), True );
else
WinTop = RelativeTop( Controller.ResY - ActualHeight(), True );
if ( ButtonsSized(C) )
{
if ( !bInit )
{
ButtonLeft = GetButtonLeft();
PositionButtons(C);
OnPreDraw = None;
}
bInit = False;
}
return true;
}
function ResolutionChanged(int ResX, int ResY)
{
SetupButtons();
}
function SetupButtons( optional string bPerButtonSizes )
{
local int i;
local GUIButton b;
if ( bPerButtonSizes != "" )
bFixedWidth = !bool(bPerButtonSizes);
if ( bAutoSize )
{
for (i = 0; i < Controls.Length; i++ )
{
b = GUIButton(Controls[i]);
if ( b != None )
{
b.bAutoSize = true;
b.AutoSizePadding.HorzPerc = b.RelativeWidth(GetPadding(),true);
}
}
}
OnPreDraw = InternalOnPreDraw;
bInit = True;
}
function bool ButtonsSized(Canvas C)
{
local int i;
local GUIButton b;
local bool bResult;
local string str;
local float T, AH, AT;
if ( !bPositioned )
return false;
bResult = true;
str = GetLongestCaption(C);
AH = ActualHeight();
AT = ActualTop();
for (i = 0; i < Controls.Length; i++ )
{
b = GUIButton(Controls[i]);
if ( b != None )
{
if ( bAutoSize && bFixedWidth )
b.SizingCaption = str;
else b.SizingCaption = "";
bResult = bResult && b.bPositioned;
if ( bFullHeight )
{
b.WinHeight = b.RelativeHeight(AH,true);
}
else
{
b.WinHeight = b.RelativeHeight(ActualHeight(ButtonHeight), true);
}
switch ( Justification )
{
case TXTA_Left:
T = ClientBounds[1];
break;
case TXTA_Center:
T = (AT + AH / 2) - (b.ActualHeight() / 2);
break;
case TXTA_Right:
// if _RO_
// wtf is this shit? it should use bounds, not clientbounds!
// damn you quantum physics!
T = Bounds[3] - b.ActualHeight();
// else
//T = ClientBounds[3] - b.ActualHeight();
// end if _RO_
break;
}
b.WinTop = b.RelativeTop(T, true ) + ((WinHeight - ButtonHeight) / 2);
// b.WinTop = b.RelativeTop(T, true );
}
}
return bResult;
}
function PositionButtons( Canvas C )
{
local int i;
local GUIButton b;
local float x;
for ( i = 0; i < Controls.Length; i++ )
{
b = GUIButton(Controls[i]);
if ( b != None && b.bVisible )
{
if ( x == 0 )
x = ButtonLeft;
else x += GetSpacer();
b.WinLeft = b.RelativeLeft( x, True );
x += b.ActualWidth();
}
}
}
// Finds the longest caption of all the buttons
function string GetLongestCaption(Canvas C)
{
local int i;
local float XL, YL, LongestW;
local string str;
local GUIButton b;
if ( C == None )
return "";
for ( i = 0; i < Controls.Length; i++ )
{
b = GUIButton(Controls[i]);
if ( b != None && b.bVisible )
{
if ( b.Style != None )
b.Style.TextSize(C, b.MenuState, b.Caption, XL, YL, b.FontScale);
else C.StrLen( b.Caption, XL, YL );
if ( LongestW == 0 || XL > LongestW )
{
str = b.Caption;
LongestW = XL;
}
}
}
return str;
}
function float GetButtonLeft()
{
local int i;
local GUIButton b;
local float TotalWidth, AW, AL;
local float FooterMargin;
AL = ActualLeft();
AW = ActualWidth();
FooterMargin = GetMargin();
for (i = 0; i < Controls.Length; i++ )
{
b = GUIButton(Controls[i]);
if ( b != None && b.bVisible )
{
if ( TotalWidth > 0 )
TotalWidth += GetSpacer();
TotalWidth += b.ActualWidth();
}
}
if ( Alignment == TXTA_Center )
return (AL + AW) / 2 - FooterMargin / 2 - TotalWidth / 2;
if ( Alignment == TXTA_Right )
return (AL + AW - FooterMargin / 2) - TotalWidth;
return AL + (FooterMargin / 2);
}
function float GetMargin()
{
return ActualWidth(Margin);
}
function float GetPadding()
{
return ActualWidth(Padding);
}
function float GetSpacer()
{
return ActualWidth(Spacer);
}
event Timer()
{
SetCaption("");
}
DefaultProperties
{
WinHeight=0.05
ButtonHeight=0.035
WinTop=0.950000
WinWidth=1.000000
WinLeft=0.000000
PropagateVisibility=True
Padding=0.16
Margin=0.009
OnPreDraw=InternalOnPreDraw
bNeverFocus=False
bFixedWidth=true
bFullHeight=false
bAutoSize=true
Alignment=TXTA_Right
}

View file

@ -0,0 +1,62 @@
//==============================================================================
// Created on: 12/12/2003
// Components for easily grouping components with a GUISectionBackground
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class ComponentGroup extends GUIMultiComponent;
var automated GUISectionBackground i_Background;
var localized string Caption;
function InitComponent(GUIController InController, GUIComponent InOwner)
{
Super.InitComponent(InController, InOwner);
SetCaption(Caption);
}
function GUIComponent ManageComponent( GUIComponent C )
{
if ( C != None )
i_Background.ManageComponent(C);
return C;
}
function GUIComponent AppendComponent(GUIComponent NewComp, optional bool bSkipRemap)
{
return ManageComponent( Super.AppendComponent(NewComp, bSkipRemap) );
}
function GUIComponent InsertComponent(GUIComponent Newcomp, int Index, optional bool bSkipRemap)
{
return ManageComponent( Super.InsertComponent(NewComp, Index, bSkipRemap) );
}
function bool RemoveComponent(GUIComponent Comp, optional bool bSkipRemap)
{
i_Background.UnmanageComponent(Comp);
return Super.RemoveComponent(Comp, bSkipRemap);
}
function SetCaption( string NewCaption )
{
Caption = NewCaption;
i_Background.Caption = Caption;
}
DefaultProperties
{
Begin Object Class=GUISectionBackground Name=CGBackground
WinWidth=1.0
WinHeight=1.0
WinLeft=0.0
WinTop=0.0
bScaleToParent=True
bBoundToParent=True
End Object
i_Background=CGBackground
}

View file

@ -0,0 +1,239 @@
//==============================================================================
// Created on: 11/23/2003
// Description
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class ControlBinder extends KeyBindMenu;
var localized string BindingLabel[150];
function LoadCommands()
{
local int i;
Super.LoadCommands();
// Update the MultiColumnList's sortdata array to reflect the indexes of our Bindings array
for (i = 0; i < Bindings.Length; i++)
li_Binds.AddedItem();
}
function MapBindings()
{
LoadCustomBindings();
Super.MapBindings();
}
protected function LoadCustomBindings()
{
local int i;
local array<string> KeyBindClasses;
local class<GUIUserKeyBinding> CustomKeyBindClass;
// Load custom keybinds from .int files
PlayerOwner().GetAllInt("XInterface.GUIUserKeyBinding",KeyBindClasses);
for (i = 0; i < KeyBindClasses.Length; i++)
{
CustomKeyBindClass = class<GUIUserKeyBinding>(DynamicLoadObject(KeyBindClasses[i],class'Class'));
if (CustomKeyBindClass != None)
AddCustomBindings( CustomKeyBindClass.default.KeyData );
}
}
function AddCustomBindings( array<GUIUserKeyBinding.KeyInfo> KeyData )
{
local int i;
for ( i = 0; i < KeyData.Length; i++ )
CreateAliasMapping( KeyData[i].Alias, KeyData[i].KeyLabel, KeyData[i].bIsSection );
}
function ClearBindings()
{
local int i, max;
Super.ClearBindings();
Bindings = default.Bindings;
max = Min(Bindings.Length, ArrayCount(BindingLabel));
for ( i = 0; i < max; i++ )
{
if ( BindingLabel[i] != "" )
Bindings[i].KeyLabel = BindingLabel[i];
}
}
DefaultProperties
{
PageCaption="Configure Keys"
Headings(0)="Action"
Bindings(0)=(bIsSectionLabel=true,KeyLabel="Movement")
BindingLabel(0)="Movement"
Bindings(1)=(KeyLabel="Forward",Alias="MoveForward")
BindingLabel(1)="Forward"
Bindings(2)=(KeyLabel="Backward",Alias="MoveBackward")
BindingLabel(2)="Backward"
Bindings(3)=(KeyLabel="Strafe Left",Alias="StrafeLeft")
BindingLabel(3)="Strafe Left"
Bindings(4)=(KeyLabel="Strafe Right",Alias="StrafeRight")
BindingLabel(4)="Strafe Right"
Bindings(5)=(KeyLabel="Jump",Alias="Jump")
BindingLabel(5)="Jump"
Bindings(6)=(KeyLabel="Walk",Alias="Walking")
BindingLabel(6)="Walk"
Bindings(7)=(KeyLabel="Crouch",Alias="Duck")
BindingLabel(7)="Crouch"
Bindings(8)=(KeyLabel="Strafe Toggle",Alias="Strafe")
BindingLabel(8)="Strafe Toggle"
Bindings(9)=(bIsSectionLabel=true,KeyLabel="Looking")
BindingLabel(9)="Looking"
Bindings(10)=(KeyLabel="Turn Left",Alias="TurnLeft")
BindingLabel(10)="Turn Left"
Bindings(11)=(KeyLabel="Turn Right",Alias="TurnRight")
BindingLabel(11)="Turn Right"
Bindings(12)=(KeyLabel="Look Up",Alias="LookUp")
BindingLabel(12)="Look Up"
Bindings(13)=(KeyLabel="Look Down",Alias="LookDown")
BindingLabel(13)="Look Down"
Bindings(14)=(KeyLabel="Center View",Alias="CenterView")
BindingLabel(14)="Center View"
Bindings(15)=(KeyLabel="Toggle \"BehindView\"",Alias="ToggleBehindView")
BindingLabel(15)="Toggle \"BehindView\""
Bindings(16)=(KeyLabel="Toggle Camera Mode",Alias="ToggleFreeCam")
BindingLabel(16)="Toggle Camera Mode"
Bindings(17)=(bIsSectionLabel=true,KeyLabel="Weapons")
BindingLabel(17)="Weapons"
Bindings(18)=(KeyLabel="Fire",Alias="Fire")
BindingLabel(18)="Fire"
Bindings(19)=(KeyLabel="Alt-Fire",Alias="AltFire")
BindingLabel(19)="Alt-Fire"
Bindings(20)=(KeyLabel="Throw Weapon",Alias="ThrowWeapon")
BindingLabel(20)="Throw Weapon"
Bindings(21)=(KeyLabel="Best Weapon",Alias="SwitchToBestWeapon")
BindingLabel(21)="Best Weapon"
Bindings(22)=(KeyLabel="Next Weapon",Alias="NextWeapon")
BindingLabel(22)="Next Weapon"
Bindings(23)=(KeyLabel="Prev Weapon",Alias="PrevWeapon")
BindingLabel(23)="Prev Weapon"
Bindings(24)=(KeyLabel="Last Weapon",Alias="SwitchToLastWeapon")
BindingLabel(24)="Last Weapon"
Bindings(25)=(KeyLabel="Weapon Selection",Alias="")
BindingLabel(25)="Weapon Selection"
Bindings(26)=(KeyLabel="Super Weapon",Alias="SwitchWeapon 0")
BindingLabel(26)="Super Weapon"
Bindings(27)=(KeyLabel="Shield Gun",Alias="SwitchWeapon 1")
BindingLabel(27)="Shield Gun"
Bindings(28)=(KeyLabel="Assault Rifle",Alias="SwitchWeapon 2")
BindingLabel(28)="Assault Rifle"
Bindings(29)=(KeyLabel="Bio-Rifle",Alias="SwitchWeapon 3")
BindingLabel(29)="Bio-Rifle"
Bindings(30)=(KeyLabel="Shock Rifle",Alias="SwitchWeapon 4")
BindingLabel(30)="Shock Rifle"
Bindings(31)=(KeyLabel="Link Gun",Alias="SwitchWeapon 5")
BindingLabel(31)="Link Gun"
Bindings(32)=(KeyLabel="Minigun",Alias="SwitchWeapon 6")
BindingLabel(32)="Minigun"
Bindings(33)=(KeyLabel="Flak Cannon",Alias="SwitchWeapon 7")
BindingLabel(33)="Flak Cannon"
Bindings(34)=(KeyLabel="Rocket Launcher",Alias="SwitchWeapon 8")
BindingLabel(34)="Rocket Launcher"
Bindings(35)=(KeyLabel="Lightning Rifle",Alias="SwitchWeapon 9")
BindingLabel(35)="Lightning Rifle"
Bindings(36)=(KeyLabel="Translocator",Alias="SwitchWeapon 10")
BindingLabel(36)="Translocator"
Bindings(37)=(bIsSectionLabel=true,KeyLabel="Communication")
BindingLabel(37)="Communication"
Bindings(38)=(KeyLabel="Say",Alias="Talk")
BindingLabel(38)="Say"
Bindings(39)=(KeyLabel="Team Say",Alias="TeamTalk")
BindingLabel(39)="Team Say"
Bindings(40)=(KeyLabel="In Game Chat",Alias="InGameChat")
BindingLabel(40)="In Game Chat"
Bindings(41)=(KeyLabel="Speech Menu",Alias="SpeechMenuToggle")
BindingLabel(41)="Speech Menu"
Bindings(42)=(KeyLabel="Activate Microphone",Alias="VoiceTalk")
BindingLabel(42)="Activate Microphone"
Bindings(43)=(KeyLabel="Speak in Public Channel",Alias="Speak Public")
BindingLabel(43)="Speak in Public Channel"
Bindings(44)=(KeyLabel="Speak in local Channel",Alias="Speak Local")
BindingLabel(44)="Speak in local Channel"
Bindings(45)=(KeyLabel="Speak in Team Channel",Alias="Speak Team")
BindingLabel(45)="Speak in Team Channel"
Bindings(46)=(KeyLabel="Toggle Public Chatroom",Alias="TogglePublicChat")
BindingLabel(46)="Toggle Public Channel"
Bindings(47)=(KeyLabel="Toggle Local Chatroom",Alias="ToggleLocalChat")
BindingLabel(47)="Toggle Local Channel"
Bindings(48)=(KeyLabel="Toggle Team Chatroom",Alias="ToggleTeamChat")
BindingLabel(48)="Toggle Team Channel"
Bindings(49)=(bIsSectionLabel=true,KeyLabel="Taunts")
BindingLabel(49)="Taunts"
Bindings(50)=(KeyLabel="Pelvic Thrust",Alias="taunt pthrust")
BindingLabel(50)="Pelvic Thrust"
Bindings(51)=(KeyLabel="Ass Smack",Alias="taunt asssmack")
BindingLabel(51)="Ass Smack"
Bindings(52)=(KeyLabel="Throat Cut",Alias="taunt throatcut")
BindingLabel(52)="Throat Cut"
Bindings(53)=(KeyLabel="Brag",Alias="taunt gesture_point")
BindingLabel(53)="Brag"
Bindings(54)=(bIsSectionLabel=true,KeyLabel="Hud")
BindingLabel(54)="Hud"
Bindings(55)=(KeyLabel="Grow Hud",Alias="GrowHud")
BindingLabel(55)="Grow Hud"
Bindings(56)=(KeyLabel="Shrink Hud",Alias="ShrinkHud")
BindingLabel(56)="Shrink Hud"
Bindings(57)=(KeyLabel="Show Radar Map",Alias="ToggleRadarMap")
BindingLabel(57)="Show Radar Map"
Bindings(58)=(KeyLabel="ScoreBoard",Alias="ShowScores")
BindingLabel(58)="ScoreBoard Toggle"
Bindings(59)=(KeyLabel="ScoreBoard (QuickView)",Alias="ScoreToggle")
BindingLabel(59)="ScoreBoard"
Bindings(60)=(bIsSectionLabel=true,KeyLabel="Game")
BindingLabel(60)="Game"
Bindings(61)=(KeyLabel="Use",Alias="use")
BindingLabel(61)="Use"
Bindings(62)=(KeyLabel="Pause",Alias="Pause")
BindingLabel(62)="Pause"
Bindings(63)=(KeyLabel="Screenshot",Alias="shot")
BindingLabel(63)="Screenshot"
Bindings(64)=(KeyLabel="Find Red Base",Alias="basepath 0")
BindingLabel(64)="Find Red Base"
Bindings(65)=(KeyLabel="Find Blue Base",Alias="basepath 1")
BindingLabel(65)="Find Blue Base"
Bindings(66)=(KeyLabel="Next Inventory Item",Alias="InventoryNext")
BindingLabel(66)="Next Inventory Item"
Bindings(67)=(KeyLabel="Previous Inventory Item",Alias="InventoryPrevious")
BindingLabel(67)="Previous Inventory Item"
Bindings(68)=(KeyLabel="Activate Current Inventory Item",Alias="InventoryActivate")
BindingLabel(68)="Activate Current Inventory Item"
Bindings(69)=(KeyLabel="Show Personal Stats",Alias="ShowStats")
BindingLabel(69)="Show Personal Stats"
Bindings(70)=(KeyLabel="View Next Player's Stats",Alias="NextStats")
BindingLabel(70)="View Next Player's Stats"
Bindings(71)=(KeyLabel="Server Info",Alias="ServerInfo")
BindingLabel(71)="Server Info"
Bindings(72)=(KeyLabel="Vehicle Horn",Alias="playvehiclehorn 0")
BindingLabel(72)="Vehicle Horn"
Bindings(73)=(bIsSectionLabel=true,KeyLabel="Miscellaneous")
BindingLabel(73)="Miscellaneous"
Bindings(74)=(KeyLabel="Menu",Alias="ShowMenu")
BindingLabel(74)="Menu"
Bindings(75)=(KeyLabel="Music Player",Alias="MusicMenu")
BindingLabel(75)="Music Player"
Bindings(76)=(KeyLabel="Voting Menu",Alias="ShowVoteMenu")
BindingLabel(76)="Voting Menu"
Bindings(77)=(KeyLabel="Toggle Console",Alias="ConsoleToggle")
BindingLabel(77)="Toggle Console"
Bindings(78)=(KeyLabel="View Connection Status",Alias="Stat Net")
BindingLabel(78)="View Connection Status"
Bindings(79)=(KeyLabel="Cancel Pending Connection",Alias="Cancel")
BindingLabel(79)="Cancel Pending Connection"
}

View file

@ -0,0 +1,494 @@
//==============================================================================
// Base class for custom server browser filters
//
// Created by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class CustomFilter extends Object
DependsOn(MasterServerClient)
Config(ServerFilters)
PerObjectConfig;
enum EDataType
{
DT_Unique, // Only one item with this key can exist
DT_Ranged, // Max of two items with this key can exist, and QueryType cannot be QT_Equals
DT_Multiple // Allow multiple items with the same name
};
struct AFilterRule
{
var MasterServerClient.QueryData FilterItem; // Key, Value, QueryType
var EDataType FilterType;
var string ItemName; // FriendlyName
};
struct CurrentFilter
{
var AFilterRule Item;
var int ItemIndex; // Index of item
};
var protected config array<AFilterRule> Rules;
var protected config string DefaultTitle;
var protected config bool Active;
var protected array<CurrentFilter> AllRules;
var protected string Title;
var protected bool bEnabled;
var protected bool bDirty;
function Created()
{
CancelChanges();
}
function CancelChanges()
{
Title = DefaultTitle;
bEnabled = Active;
InitializeRules();
bDirty = False;
}
// Initialize all stored rules into the instance set
protected function InitializeRules()
{
local int i;
if (AllRules.Length > 0)
AllRules.Remove(0, AllRules.Length);
// Create working set of rules from stored values
for (i = 0; i < Rules.Length; i++)
AddRule(Rules[i].ItemName, Rules[i].FilterItem.Key, Rules[i].FilterItem.Value, Rules[i].FilterItem.QueryType, Rules[i].FilterType);
}
function bool SetTitle( string NewTitle )
{
bDirty = bDirty || NewTitle != Title;
Title = NewTitle;
return true;
}
function bool SetActive( bool NewActive )
{
bDirty = bDirty || NewActive != bEnabled;
bEnabled = NewActive;
return true;
}
function SetRules( array<CurrentFilter> NewRules )
{
AllRules = NewRules;
bDirty = True;
}
function string GetTitle()
{
return Title;
}
function bool IsActive()
{
return bEnabled;
}
function GetQueryRules( out array<AFilterRule> OutRules )
{
Save();
OutRules = Rules;
}
function GetRules( out array<CurrentFilter> OutRules )
{
OutRules = AllRules;
}
function Save( optional bool bForceSave )
{
local int i;
if ( bDirty || bForceSave )
{
DefaultTitle = Title;
Active = bEnabled;
if ( Rules.Length > 0 )
Rules.Remove(0, Rules.Length);
for (i = 0; i < AllRules.Length; i++)
Rules[Rules.Length] = AllRules[i].Item;
SaveConfig();
}
bDirty = False;
}
//==============================================================================
//
// Query functions
//
function int Count()
{
return AllRules.Length;
}
function bool FindRule( out AFilterRule Rule, string ItemName, optional string Value )
{
local int i;
i = FindRuleIndex(ItemName,Value);
return GetRule(i, Rule);
}
function bool GetRule( int Index, out AFilterRule Rule )
{
if ( ValidIndex(Index) )
{
Rule = AllRules[Index].Item;
return True;
}
return False;
}
function int FindRuleIndex(string ItemName, optional string Value)
{
local int i, j;
j = InStr(ItemName, ".");
if (j != -1)
ItemName = Mid(ItemName, j+1);
for (i = 0; i < AllRules.Length; i++)
if (AllRules[i].Item.FilterItem.Key ~= ItemName)
{
if (Value == "" || (Value != "" && Value ~= AllRules[i].Item.FilterItem.Value))
return i;
}
return -1;
}
// This function returns index for an item name and ItemIndex (for finding the absolute index of multi-items)
function int FindItemIndex(string ItemName, int ItemIndex)
{
local int i;
for (i = 0; i < AllRules.Length; i++)
if (AllRules[i].Item.FilterItem.Key ~= ItemName && AllRules[i].ItemIndex == ItemIndex)
return i;
return -1;
}
protected function int FindLastIndex(string ItemName)
{
local int i, j;
j = -1;
for (i = 0; i < AllRules.Length; i++)
{
if (AllRules[i].Item.FilterItem.Key ~= ItemName && AllRules[i].ItemIndex > j)
j = AllRules[i].ItemIndex;
}
return j;
}
function int FindInnerIndex(string ItemName, string Value)
{
local int i, j;
j = InStr(ItemName, ".");
if (j != -1)
ItemName = Mid(ItemName, j+1);
for (i = 0; i < AllRules.Length; i++)
if (AllRules[i].Item.FilterItem.Key ~= ItemName && AllRules[i].Item.FilterItem.Value ~= Value)
return AllRules[i].ItemIndex;
return -1;
}
function string GetRuleKey(int Index)
{
if (ValidIndex(Index))
return AllRules[Index].Item.FilterItem.Key;
return "";
}
function string GetRuleType(int Index)
{
if (ValidIndex(Index))
return GetDataTypeString(AllRules[Index].Item.FilterType);
return "";
}
function string GetRuleQueryType( int Index )
{
if ( ValidIndex(Index) )
return string(GetEnum(enum'EQueryType', AllRules[Index].Item.FilterItem.QueryType));
return "";
}
// Returns all values for a rule - works for single and multiple rules
function array<string> GetRuleValues(int Index)
{
local int i;
local array<string> Ar;
local array<CurrentFilter> Subset;
Subset = GetRuleSetAt(Index);
for (i = 0; i < Subset.Length; i++)
Ar[i] = Subset[i].Item.FilterItem.Value;
return Ar;
}
function array<CurrentFilter> GetRuleSet(string ItemName)
{
local int i;
local array<CurrentFilter> RuleAr;
ChopClass(ItemName);
for (i = 0; i < AllRules.Length; i++)
if (AllRules[i].Item.FilterItem.Key ~= ItemName)
RuleAr[RuleAr.Length] = AllRules[i];
return RuleAr;
}
function array<CurrentFilter> GetRuleSetAt(int Index)
{
local array<CurrentFilter> RuleAr;
if (ValidIndex(Index))
RuleAr = GetRuleSet(AllRules[Index].Item.FilterItem.Key);
return RuleAr;
}
function PostEdit(string NewTitle, array<CustomFilter.AFilterRule> NewRules)
{
local int i;
AllRules.Remove(0,AllRules.Length);
Title = NewTitle;
for (i=0;i<NewRules.Length;i++)
AddRule(NewRules[i].ItemName,NewRules[i].FilterItem.Key, NewRules[i].FilterItem.Value, NewRules[i].FilterItem.QueryType, NewRules[i].FilterType);
bDirty = true;
Save();
}
function float AddRule(string NewName, string NewKey, string NewValue, MasterServerClient.EQueryType QType, EDataType DType)
{
local int i, j;
local CurrentFilter NewRule;
local AFilterRule NewItem;
local MasterServerClient.QueryData KeyPair;
j = FindLastIndex(NewKey);
NewRule.ItemIndex = j+1;
i = AllRules.Length;
// Not found, so just add it
KeyPair.Key = NewKey;
KeyPair.Value = NewValue;
KeyPair.QueryType = QType;
NewItem.ItemName = NewName;
NewItem.FilterItem = KeyPair;
NewItem.FilterType = DType;
NewRule.Item = NewItem;
AllRules[i] = NewRule;
bDirty = True;
return i;
}
function bool RemoveRule(string ItemName)
{
local int i;
local bool bSuccess;
for ( i = AllRules.Length - 1; i >= 0; i-- )
{
if (AllRules[i].Item.FilterItem.Key ~= ItemName)
{
bDirty = True;
bSuccess = True;
AllRules.Remove(i--, 1);
}
}
return bSuccess;
}
function bool RemoveRuleAt(int Index)
{
if (ValidIndex(Index))
return RemoveRule(AllRules[Index].Item.FilterItem.Key);
return false;
}
//==============================================================================
//
// Saving & Loading
//
function ImportFilter(CustomFilter ImportFrom)
{
SetTitle( ImportFrom.GetTitle() );
SetActive( ImportFrom.IsActive() );
ImportFrom.GetRules( AllRules );
bDirty = True;
}
function ResetRules()
{
CancelChanges();
}
function bool ChangeRule(int Index, string NewTag, string NewValue, MasterServerClient.EQueryType NewType)
{
if (!ValidIndex(Index))
return false;
AllRules[Index].Item.ItemName = NewTag;
AllRules[Index].Item.FilterItem.Value = NewValue;
AllRules[Index].Item.FilterItem.QueryType = NewType;
bDirty = True;
return true;
}
function bool ValidIndex(int Index)
{
return (Index >= 0 && Index < AllRules.Length);
}
//==============================================================================
//
// Internal functions
//
static final function EDataType GetDataType(string DT)
{
switch (DT)
{
case "DT_Multiple": return DT_Multiple;
case "DT_Ranged": return DT_Ranged;
default: return DT_Unique;
}
}
static final function string GetDataTypeString(EDataType Type)
{
if (Type == DT_Unique)
return "DT_Unique";
if (Type == DT_Ranged)
return "DT_Ranged";
if (Type == DT_Multiple)
return "DT_Multiple";
return "";
}
static final function string GetQueryString(MasterServerClient.EQueryType QT)
{
switch (QT)
{
case QT_Equals: return "QT_Equals";
case QT_NotEquals: return "QT_NotEquals";
case QT_LessThan: return "QT_LessThan";
case QT_LessThanEquals: return "QT_LessThanEquals";
case QT_GreaterThan: return "QT_GreaterThan";
case QT_GreaterThanEquals: return "QT_GreaterThanEquals";
default: return "QT_Disabled";
}
return "";
}
static final function MasterServerClient.EQueryType GetQueryType(string QT)
{
switch (QT)
{
case "QT_Equals": return QT_Equals;
case "QT_NotEquals": return QT_NotEquals;
case "QT_LessThan": return QT_LessThan;
case "QT_LessThanEquals": return QT_LessThanEquals;
case "QT_GreaterThan": return QT_GreaterThan;
case "QT_GreaterThanEquals": return QT_GreaterThanEquals;
default: return QT_Disabled;
}
}
static final function AFilterRule StaticGenerateRule(string FriendlyName, string ItemName, string ItemVal, EDataType ItemDataType, MasterServerClient.EQueryType ItemQueryType)
{
local AFilterRule NewItem;
local MasterServerClient.QueryData KeyPair;
KeyPair.Key = ItemName;
KeyPair.Value = ItemVal;
KeyPair.QueryType = ItemQueryType;
NewItem.ItemName = FriendlyName;
NewItem.FilterItem = KeyPair;
NewItem.FilterType = ItemDataType;
return NewItem;
}
protected function string GetUniqueName(string Test, int Index)
{
local int i, j;
local string S;
for (i = 0; i < AllRules.Length; i++)
{
if ( AllRules[i].ItemIndex == Index && AllRules[i].Item.ItemName ~= (Test $ S) )
{
S = " " $ string(++j);
i = -1;
}
}
return Test $ S;
}
static final function ChopClass(out string FullName)
{
local int i;
i = InStr(FullName, ".");
while (i >= 0)
{
FullName = Mid(FullName, i+1);
i = InStr(FullName, ".");
}
}
DefaultProperties
{
}

View file

@ -0,0 +1,482 @@
//==============================================================================
// Created on: 09/22/2003
// Custom HUD settings menu for UT2K4Assault.ASGameInfo
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class CustomHUDMenuAssault extends UT2K4CustomHUDMenu;
// Commented out UT2k4Merge - Ramm
/*
var class<HUD_Assault> HUDClass;
var automated moCheckbox ch_Reticles, ch_InfoPods, ch_bShow3DArrow, ch_bDrawAllObjectives, ch_bObjectiveReminder, ch_bShowWillowWhisp;
var automated moSlider sl_ReticleSize;
var automated moNumericEdit nu_PulseTime;
var automated GUISectionBackground sb_Main, sb_Misc;
var bool bReticle, bInfoPods, bShow3DArrow, bDrawAllObjectives, bObjectiveReminder, bShowWillowWhisp;
var float fReticle;
var int iPulseTime;
var localized string MainCaption;
function bool InitializeGameClass( string GameClassName )
{
sb_Main.ManageComponent(ch_Reticles);
sb_Main.ManageComponent(sl_ReticleSize);
sb_Misc.ManageComponent(ch_InfoPods);
sb_Misc.ManageComponent(ch_bDrawAllObjectives);
sb_Misc.ManageComponent(ch_bShow3DArrow);
sb_Misc.Managecomponent(ch_bObjectiveReminder);
sb_Misc.ManageComponent(nu_PulseTime);
sb_Misc.ManageComponent(ch_bShowWillowWhisp);
if ( GameClassName != "" )
GameClass = class<GameInfo>(DynamicLoadObject( GameClassName, class'Class' ));
if ( GameClass == None )
{
Warn(Name@"could not load specified gametype:"@GameClassName);
return False;
}
if ( GameClass.default.HUDType != "" )
{
HUDClass = class<HUD_Assault>(DynamicLoadObject(GameClass.default.HUDType, class'Class'));
if ( HUDClass == None )
{
Warn(Name@"could not load specified HUD type:"@GameClass.default.HUDType);
return False;
}
}
return True;
}
function LoadSettings()
{
local HUD_Assault ASHUD;
ASHUD = HUD_Assault(PlayerOwner().myHUD);
if ( ASHUD == None )
{
bReticle = HUDClass.default.bOnHUDObjectiveNotification;
ch_Reticles.SetComponentValue( bReticle, True );
bInfoPods = HUDClass.default.bShowInfoPods;
ch_InfoPods.SetComponentValue( bInfoPods, True );
fReticle = HUDClass.default.ObjectiveScale;
sl_ReticleSize.SetComponentValue( fReticle, True );
iPulseTime = HUDClass.default.ObjectiveProgressPulseTime;
nu_PulseTime.SetComponentValue( iPulseTime, True );
bShow3DArrow = HUDClass.default.bShow3DArrow;
ch_bShow3DArrow.SetComponentValue( bShow3DArrow, True );
bObjectiveReminder = HUDClass.default.bObjectiveReminder;
ch_bObjectiveReminder.SetComponentValue( bObjectiveReminder, True );
bDrawAllObjectives = HUDClass.default.bDrawAllObjectives;
ch_bDrawAllObjectives.SetComponentValue( bDrawAllObjectives, True );
bShowWillowWhisp = HUDClass.default.bShowWillowWhisp;
ch_bShowWillowWhisp.SetComponentValue( bShowWillowWhisp, True );
}
else
{
bReticle = ASHUD.bOnHUDObjectiveNotification;
ch_Reticles.SetComponentValue( bReticle, True );
bInfoPods = ASHUD.bShowInfoPods;
ch_InfoPods.SetComponentValue( bInfoPods, True );
fReticle = ASHUD.ObjectiveScale;
sl_ReticleSize.SetComponentValue( fReticle, True );
iPulseTime = ASHUD.ObjectiveProgressPulseTime;
nu_PulseTime.SetComponentValue( iPulseTime, True );
bShow3DArrow = ASHUD.bShow3DArrow;
ch_bShow3DArrow.SetComponentValue( bShow3DArrow, True );
bObjectiveReminder = ASHUD.bObjectiveReminder;
ch_bObjectiveReminder.SetComponentValue( bObjectiveReminder, True );
bDrawAllObjectives = ASHUD.bDrawAllObjectives;
ch_bDrawAllObjectives.SetComponentValue( bDrawAllObjectives, True );
bShowWillowWhisp = ASHUD.bShowWillowWhisp;
ch_bShowWillowWhisp.SetComponentValue( bShowWillowWhisp, True );
}
}
function InternalOnChange(GUIComponent Sender)
{
switch ( Sender )
{
case ch_Reticles:
bReticle = ch_Reticles.IsChecked();
break;
case ch_InfoPods:
bInfoPods = ch_InfoPods.IsChecked();
break;
case sl_ReticleSize:
fReticle = sl_ReticleSize.GetValue();
break;
case nu_PulseTime:
iPulseTime = nu_PulseTime.GetValue();
break;
case ch_bShow3DArrow:
bShow3DArrow = ch_bShow3DArrow.IsChecked();
break;
case ch_bObjectiveReminder:
bObjectiveReminder = ch_bObjectiveReminder.IsChecked();
break;
case ch_bDrawAllObjectives:
bDrawAllObjectives = ch_bDrawAllObjectives.IsChecked();
break;
case ch_bShowWillowWhisp:
bShowWillowWhisp = ch_bShowWillowWhisp.IsChecked();
break;
}
Super.InternalOnChange( Sender );
}
function SaveSettings()
{
local bool bSave;
local HUD_Assault ASHUD;
Super.SaveSettings();
ASHUD = HUD_Assault(PlayerOwner().myHUD);
if ( ASHUD == None )
{
if ( HUDClass.default.bOnHUDObjectiveNotification != bReticle )
{
HUDClass.default.bOnHUDObjectiveNotification = bReticle;
bSave = True;
}
if ( HUDClass.default.bShowInfoPods != bInfoPods )
{
HUDClass.default.bShowInfoPods = bInfoPods;
bSave = True;
}
if ( HUDClass.default.ObjectiveScale != fReticle )
{
HUDClass.default.ObjectiveScale = fReticle;
bSave = True;
}
if ( HUDClass.default.ObjectiveProgressPulseTime != iPulseTime )
{
HUDClass.default.ObjectiveProgressPulseTime = iPulseTime;
bSave = True;
}
if ( HUDClass.default.bShow3DArrow != bShow3DArrow )
{
HUDClass.default.bShow3DArrow = bShow3DArrow;
bSave = True;
}
if ( HUDClass.default.bObjectiveReminder != bObjectiveReminder )
{
HUDClass.default.bObjectiveReminder = bObjectiveReminder;
bSave = True;
}
if ( HUDClass.default.bDrawAllObjectives != bDrawAllObjectives )
{
HUDClass.default.bDrawAllObjectives = bDrawAllObjectives;
bSave = True;
}
if ( HUDClass.default.bShowWillowWhisp != bShowWillowWhisp )
{
HUDClass.default.bShowWillowWhisp = bShowWillowWhisp;
bSave = True;
}
if ( bSave )
HUDClass.static.StaticSaveConfig();
}
else
{
if ( ASHUD.bOnHUDObjectiveNotification != bReticle )
{
ASHUD.bOnHUDObjectiveNotification = bReticle;
bSave = True;
}
if ( ASHUD.bShowInfoPods != bInfoPods )
{
ASHUD.bShowInfoPods = bInfoPods;
bSave = True;
}
if ( ASHUD.ObjectiveScale != fReticle )
{
ASHUD.ObjectiveScale = fReticle;
bSave = True;
}
if ( ASHUD.ObjectiveProgressPulseTime != iPulseTime )
{
ASHUD.ObjectiveProgressPulseTime = iPulseTime;
bSave = True;
}
if ( ASHUD.bShow3DArrow != bShow3DArrow )
{
ASHUD.bShow3DArrow = bShow3DArrow;
bSave = True;
}
if ( ASHUD.bObjectiveReminder != bObjectiveReminder )
{
ASHUD.bObjectiveReminder = bObjectiveReminder;
bSave = True;
}
if ( ASHUD.bDrawAllObjectives != bDrawAllObjectives )
{
ASHUD.bDrawAllObjectives = bDrawAllObjectives;
bSave = True;
}
if ( ASHUD.bShowWillowWhisp != bShowWillowWhisp )
{
ASHUD.bShowWillowWhisp = bShowWillowWhisp;
bSave = True;
}
if ( bSave )
ASHUD.SaveConfig();
}
}
function RestoreDefaults()
{
if ( HudClass != None )
{
HudClass.static.ResetConfig("bOnHUDObjectiveNotification");
HudClass.static.ResetConfig("bShowInfoPods");
HudClass.static.ResetConfig("ObjectiveScale");
HudClass.static.ResetConfig("ObjectiveProgressPulseTime");
HudClass.static.ResetConfig("bShow3DArrow");
HudClass.static.ResetConfig("bObjectiveReminder");
HudClass.static.ResetConfig("bDrawAllObjectives");
HudClass.static.ResetConfig("bShowWillowWhisp");
Super.RestoreDefaults();
}
}
DefaultProperties
{
WinWidth=0.690941
WinHeight=0.824065
WinLeft=0.140625
WinTop=0.072917
Begin Object class=GUISectionBackground name=ObjectiveBackground
WinWidth=0.631835
WinHeight=0.229493
WinLeft=0.171485
WinTop=0.122136
Caption="Objectives"
End Object
sb_Main=ObjectiveBackground
Begin Object class=GUISectionBackground Name=MiscBackground
Caption="Misc."
WinWidth=0.630273
WinHeight=0.402735
WinLeft=0.171485
WinTop=0.372135
End Object
sb_Misc=MiscBackground
Begin Object class=moCheckBox Name=Reticles
WinWidth=0.450000
WinLeft=0.024219
WinTop=0.2
Caption="Objective Reticles"
Hint="Draw Objective tracking indicators."
OnChange=InternalOnChange
CaptionWidth=0.1
bAutoSizeCaption=True
LabelJustification=TXTA_Left
ComponentJustification=TXTA_Center
TabOrder=0
End Object
ch_Reticles=Reticles
Begin Object class=moSlider Name=ReticleSize
WinWidth=0.450000
WinLeft=0.024219
WinTop=0.4
Caption="Objective Indicators Scale"
Hint="Size scale of on HUD Objective Indicators."
MinValue=0
MaxValue=4
bIntSlider=False
OnChange=InternalOnChange
CaptionWidth=0.1
bAutoSizeCaption=True
LabelJustification=TXTA_Left
ComponentJustification=TXTA_Right
TabOrder=1
End Object
sl_ReticleSize=ReticleSize
Begin Object class=moCheckBox Name=InfoPods
WinWidth=0.450000
WinLeft=0.517383
WinTop=0.15
Caption="Display Info Pods"
Hint="Show Info Pods."
OnChange=InternalOnChange
CaptionWidth=0.1
bAutoSizeCaption=True
LabelJustification=TXTA_Left
ComponentJustification=TXTA_Center
TabOrder=2
End Object
ch_InfoPods=InfoPods
Begin Object class=moNumericEdit Name=PulseTime
WinWidth=0.450000
WinLeft=0.517383
WinTop=0.3
Caption="Objective Update Time"
Hint="Number of seconds current Objective will be highlighted."
MinValue=0
MaxValue=99
OnChange=InternalOnChange
LabelJustification=TXTA_Left
ComponentJustification=TXTA_Right
CaptionWidth=0.7
bAutoSizeCaption=True
ComponentWidth=0.3
TabOrder=3
End Object
nu_PulseTime=PulseTime
Begin Object class=moCheckBox Name=Show3DArrow
WinWidth=0.450000
WinLeft=0.024219
WinTop=0.45
Caption="Show 3D Arrow"
Hint="Draw 3D Objective tracking arrow."
OnChange=InternalOnChange
CaptionWidth=0.1
bAutoSizeCaption=True
LabelJustification=TXTA_Left
ComponentJustification=TXTA_Center
TabOrder=4
End Object
ch_bShow3DArrow=Show3DArrow
Begin Object class=moCheckBox Name=DrawAllObjectives
WinWidth=0.450000
WinLeft=0.024219
WinTop=0.6
Caption="Show Full Indicators"
Hint="Draw Indicators when Objective is behind player."
OnChange=InternalOnChange
CaptionWidth=0.1
bAutoSizeCaption=True
LabelJustification=TXTA_Left
ComponentJustification=TXTA_Center
TabOrder=5
End Object
ch_bDrawAllObjectives=DrawAllObjectives
Begin Object class=moCheckBox Name=ObjectiveReminder
WinWidth=0.450000
WinHeight=0.072727
WinTop=0.75
Caption="Objective Reminder Announcer"
Hint="Remind objective goals at respawn."
OnChange=InternalOnChange
CaptionWidth=0.1
bAutoSizeCaption=True
LabelJustification=TXTA_Left
ComponentJustification=TXTA_Center
TabOrder=6
End Object
ch_bObjectiveReminder=ObjectiveReminder
Begin Object class=moCheckBox Name=ShowWillowWhisp
WinWidth=0.450000
WinLeft=0.024219
WinTop=0.6
Caption="Enable Willow Whisp"
Hint="Enable particle trail, showing path to objective."
OnChange=InternalOnChange
CaptionWidth=0.1
bAutoSizeCaption=True
LabelJustification=TXTA_Left
ComponentJustification=TXTA_Center
TabOrder=7
End Object
ch_bShowWillowWhisp=ShowWillowWhisp
Begin Object class=GUIButton name=ResetButton
WinWidth=0.139474
WinHeight=0.052944
WinLeft=0.288892
WinTop=0.792153
Caption="Defaults"
Hint="Restore all settings to their default value."
OnClick=InternalOnClick
TabOrder=7
End Object
b_Reset=ResetButton
Begin Object class=GUIButton Name=CancelButton
WinWidth=0.139474
WinHeight=0.052944
WinLeft=0.496436
WinTop=0.792153
Caption="Cancel"
Hint="Click to close this menu, discarding changes."
OnClick=InternalOnClick
TabOrder=8
End Object
b_Cancel=CancelButton
WindowName="Assault HUD Configuration"
Begin Object class=GUIButton Name=OKButton
WinWidth=0.139474
WinHeight=0.052944
WinLeft=0.640437
WinTop=0.792153
Caption="OK"
Hint="Click to close this menu, saving changes."
OnClick=InternalOnClick
TabOrder=9
End Object
b_OK=OKButton
}
*/

View file

@ -0,0 +1,724 @@
//==============================================================================
// Created on: 09/22/2003
// Custom HUD settings menu for Onslaught.ONSOnslaughtGame
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class CustomHUDMenuOnslaught extends UT2K4CustomHUDMenu;
// Commented out UT2k4Merge - Ramm
/*
var class<ONSHUDOnslaught> HUDClass;
var automated GUIImage i_Preview, i_PreviewBlend;
var automated GUISectionBackground sb_Options, sb_Preview, sb_Position;
var automated GUILabel l_RadarPosition;
var automated moCheckbox ch_RadarMap, ch_NodeBeams;
var automated moSlider sl_RadarScale, sl_IconScale, sl_RadarTrans;
var automated moFloatEdit fl_PositionX, fl_PositionY;
var automated GUIButton b_TogglePreview;
var() bool bPreviewRadar;
var() bool bMapEnabled, bNodeBeams;
var() float fRadarScale, fPosX, fPosY, fIconScale, fRadarTrans;
var() localized string ShowRadarText, ShowScreenText;
// This will be used if not currently in an Onslaught map
var() string DefaultRadarTextureName;
var() Material RadarTexture;
// switch ( Sender )
// {
// case ch_RadarMap:
// case ch_NodeBeams:
// case sl_IconScale:
// case sl_RadarScale:
// case sl_RadarTrans:
// case fl_PositionX:
// case fl_PositionY:
// }
// =====================================================================================================================
// =====================================================================================================================
// GUI Interface
// =====================================================================================================================
// =====================================================================================================================
function InitComponent( GUIController InController, GUIComponent InOwner )
{
Super.InitComponent(InController,InOwner);
UpdateToggleStatus();
}
function bool InitializeGameClass( string GameClassName )
{
sb_Preview.ManageComponent(i_Preview);
RadarTexture = PlayerOwner().Level.RadarMapImage;
if ( RadarTexture == None )
RadarTexture = material(DynamicLoadObject(DefaultRadarTextureName, class'Material'));
i_Preview.Image = RadarTexture;
UpdateToggleStatus();
sb_Options.ManageComponent(ch_RadarMap);
sb_Options.ManageComponent(ch_NodeBeams);
sb_Options.ManageComponent(sl_RadarScale);
sb_Options.ManageComponent(sl_IconScale);
sb_Options.ManageComponent(sl_RadarTrans);
if ( GameClassName != "" )
GameClass = class<GameInfo>(DynamicLoadObject( GameClassName, class'Class' ));
if ( GameClass == None )
{
Warn(Name@"could not load specified gametype:"@GameClassName);
return False;
}
if ( GameClass != None )
{
HUDClass = class<ONSHudOnslaught>(DynamicLoadObject(GameClass.default.HUDType, class'Class'));
if ( HUDClass == None )
{
Warn(Name@"could not load specified HUD type:"@GameClass.default.HUDType);
return False;
}
}
return True;
}
function LoadSettings()
{
local ONSHUDOnslaught ONSHUD;
ONSHUD = ONSHUDOnslaught(PlayerOwner().myHUD);
ch_NodeBeams.SetComponentValue( class'ONSPowerCore'.default.bShowNodeBeams, true );
if ( ONSHUD == none )
{
bMapEnabled = !HUDClass.default.bMapDisabled;
ch_RadarMap.SetComponentValue( bMapEnabled, true );
bNodeBeams = class'ONSPowerCore'.default.bShowNodeBeams;
ch_NodeBeams.SetComponentValue( bNodeBeams, true );
fIconScale = HUDClass.default.IconScale;
sl_IconScale.SetComponentValue( fIconScale, true );
fRadarScale = HUDClass.default.RadarScale;
sl_RadarScale.SetComponentValue( fRadarScale, true );
fl_PositionX.Setup(fRadarScale, fl_PositionX.MaxValue, fl_PositionX.Step);
fRadarTrans = HUDClass.default.RadarTrans;
sl_RadarTrans.SetComponentValue( fRadarTrans, true );
fPosX = HUDClass.default.RadarPosX;
fl_PositionX.SetComponentValue( fPosX, true );
fPosY = HUDClass.default.RadarPosY;
fl_PositionY.SetComponentValue( fPosY, true );
}
else
{
bMapEnabled = !ONSHUD.bMapDisabled;
ch_RadarMap.SetComponentValue( bMapEnabled, true );
bNodeBeams = class'ONSPowerCore'.default.bShowNodeBeams;
ch_NodeBeams.SetComponentValue( bNodeBeams, true );
fIconScale = ONSHUD.IconScale;
sl_IconScale.SetComponentValue( fIconScale, true );
fRadarScale = ONSHUD.RadarScale;
sl_RadarScale.SetComponentValue( fRadarScale, true );
fl_PositionX.Setup(fRadarScale, fl_PositionX.MaxValue, fl_PositionX.Step);
fRadarTrans = ONSHUD.RadarTrans;
sl_RadarTrans.SetComponentValue( fRadarTrans, true );
fPosX = ONSHUD.RadarPosX;
fl_PositionX.SetComponentValue( fPosX, true );
fPosY = ONSHUD.RadarPosY;
fl_PositionY.SetComponentValue( fPosY, true );
}
}
function InternalOnChange( GUIComponent Sender )
{
switch ( Sender )
{
case ch_RadarMap:
bMapEnabled = ch_RadarMap.IsChecked();
break;
case ch_NodeBeams:
bNodeBeams = ch_NodeBeams.IsChecked();
break;
case sl_IconScale:
fIconScale = sl_IconScale.GetValue();
break;
case sl_RadarScale:
fRadarScale = sl_RadarScale.GetValue();
fl_PositionX.Setup(fRadarScale, fl_PositionX.MaxValue, fl_PositionX.Step);
break;
case sl_RadarTrans:
fRadarTrans = sl_RadarTrans.GetValue();
break;
case fl_PositionX:
fPosX = fl_PositionX.GetValue();
break;
case fl_PositionY:
fPosY = fl_PositionY.GetValue();
break;
}
}
function SaveSettings()
{
local bool bSave, bTemp;
local ONSPowerCore Core;
local ONSHUDOnslaught HUD;
super.SaveSettings();
HUD = ONSHUDOnslaught(PlayerOwner().myHUD);
if ( HUD == None )
{
if ( HUDClass.default.bMapDisabled == bMapEnabled )
{
HUDClass.default.bMapDisabled = !bMapEnabled;
bSave = true;
}
if ( HUDClass.default.IconScale != fIconScale )
{
HUDClass.default.IconScale = fIconScale;
bSave = true;
}
if ( HUDClass.default.RadarScale != fRadarScale )
{
HUDClass.default.RadarScale = fRadarScale;
bSave = true;
}
if ( HUDClass.default.RadarTrans != fRadarTrans )
{
HUDClass.default.RadarTrans = fRadarTrans;
bSave = true;
}
if ( HUDClass.default.RadarPosX != fPosX )
{
HUDClass.default.RadarPosX = fPosX;
bSave = true;
}
if ( HUDClass.default.RadarPosY != fPosY )
{
HUDClass.default.RadarPosY = fPosY;
bSave = true;
}
}
else
{
if ( HUD.bMapDisabled == ch_RadarMap.IsChecked() )
{
HUD.bMapDisabled = !bMapEnabled;
bSave = true;
}
if ( HUD.IconScale != fIconScale )
{
HUD.IconScale = fIconScale;
bSave = true;
}
if ( HUD.RadarScale != fRadarScale )
{
HUD.RadarScale = fRadarScale;
bSave = true;
}
if ( HUD.RadarTrans != fRadarTrans )
{
HUD.RadarTrans = fRadarTrans;
bSave = true;
}
if ( HUD.RadarPosX != fPosX )
{
HUD.RadarPosX = fPosX;
bSave = true;
}
if ( HUD.RadarPosY != fPosY )
{
HUD.RadarPosY = fPosY;
bSave = true;
}
}
if ( bSave )
{
if ( HUD != None )
HUD.SaveConfig();
else HUDClass.static.StaticSaveConfig();
}
bTemp = ch_NodeBeams.IsChecked();
if ( class'ONSPowerCore'.default.bShowNodeBeams != bTemp )
{
class'ONSPowerCore'.default.bShowNodeBeams = bTemp;
class'ONSPowerCore'.static.StaticSaveConfig();
foreach PlayerOwner().AllActors( class'ONSPowerCore', Core )
{
Core.bShowNodeBeams = bTemp;
Core.CheckShield();
}
}
}
function RestoreDefaults()
{
if ( HudClass != None )
{
HUDClass.static.ResetConfig("bMapDisabled");
HUDClass.static.ResetConfig("IconScale");
HUDClass.static.ResetConfig("RadarScale");
HUDClass.static.ResetConfig("RadarTrans");
HUDClass.static.ResetConfig("RadarPosX");
HUDClass.static.ResetConfig("RadarPosY");
class'ONSPowerCore'.static.ResetConfig("bShowNodeBeams");
UpdateToggleStatus();
Super.RestoreDefaults();
}
}
// =====================================================================================================================
// =====================================================================================================================
// Map Preview
// =====================================================================================================================
// =====================================================================================================================
function bool DrawMap( Canvas C )
{
if ( bPreviewRadar )
{
DrawRadar(C);
return true;
}
else
{
DrawScreen(C);
return false;
}
}
function DrawRadar( Canvas C )
{
local float HUDScale;
local ONSHUDOnslaught ONSHUD;
local ONSPowerCore Core;
local PlayerController PC;
local float AL, AT, AW, AH, X, Y, XL;
local vector V;
AL = i_Preview.ActualLeft();
AT = i_Preview.ActualTop();
AW = i_Preview.ActualWidth();
AH = i_Preview.ActualHeight();
PC = PlayerOwner();
ONSHUD = ONSHUDOnslaught(PC.myHUD);
X = AL + AW / 2.0;
Y = AT + AH / 2.0;
XL = FMin(AW,AH) / 2.0;
C.Style = 5;
if ( ONSHUD == None )
{
HUDScale = HUDClass.default.HUDScale;
V.X = XL;
V.Y = HUDClass.default.RadarMaxRange;
V.Z = fRadarTrans;
HUDClass.static.DrawMapImage(C,i_PreviewBlend.Image,X,Y,0,0,V);
HUDClass.static.DrawMapImage(C,RadarTexture,X,Y,0,0,V);
V.X = AL + AW * 0.25;
V.Y = AT + AH * 0.25;
HUDClass.static.DrawCoreIcon(C, V, false, fIconScale, PC.myHUD.HudScale, 1.0);
V.X = AL + AW * 0.75;
V.Y = AT + AH * 0.75;
HUDClass.static.DrawCoreIcon(C, V, false, fIconScale, PC.myHUD.HudScale, 1.0);
}
else
{
HUDScale = ONSHUD.HUDScale;
V.X = XL;
V.Y = ONSHUD.RadarRange;
V.Z = fRadarTrans;
ONSHUD.DrawMapImage(C,i_PreviewBlend.Image,X,Y,0,0,V);
ONSHUD.DrawMapImage(C, RadarTexture, X, Y, 0, 0, V);
Core = ONSHUD.Node;
do
{
ONSHUD.CoreWorldToScreen( Core, V, X, Y, XL, ONSHUD.RadarRange, vect(0,0,0) );
if (Core.bUnderAttack || (Core.CoreStage == 0 && Core.bSevered))
ONSHUD.DrawAttackIcon( C, Core, V, fIconScale, ONSHUD.HUDScale, ONSHUD.ColorPercent );
if (Core.bFinalCore)
ONSHUD.DrawCoreIcon( C, V, ONSHUD.PowerCoreAttackable(Core), fIconScale, ONSHUD.HUDScale, ONSHUD.ColorPercent );
else
ONSHUD.DrawNodeIcon( C, V, ONSHUD.PowerCoreAttackable(Core), Core.CoreStage, fIconScale, ONSHUD.HUDScale, ONSHUD.ColorPercent );
Core = Core.NextCore;
} until ( Core == ONSHUD.Node );
}
}
function DrawScreen(Canvas C)
{
local ONSHUDOnslaught ONSHUD;
local float HUDScale, RadarScale, RadarWidth, RadarPosX, RadarPosY, SizeX, SizeY;
ONSHUD = ONSHUDOnslaught(PlayerOwner().myHUD);
i_PreviewBlend.bBoundToParent = False;
i_PreviewBlend.bScaleToParent = False;
SizeX = i_PreviewBlend.ActualWidth();
SizeY = i_PreviewBlend.ActualHeight();
if ( ONSHUD == None )
HUDScale = HUDClass.default.HUDScale;
else HUDScale = ONSHUD.HUDScale;
RadarScale = fRadarScale * HUDScale;
RadarWidth = RadarScale * SizeX * 0.5;
RadarPosX = i_PreviewBlend.ActualLeft() + ((fPosX * SizeX) - RadarWidth);
RadarPosY = i_PreviewBlend.ActualTop() + ((fPosY * SizeY) + RadarWidth);
i_Preview.SetPosition( RadarPosX, RadarPosY, RadarWidth * 2, RadarWidth * 2 );
}
function bool TogglePreview( GUIComponent c )
{
bPreviewRadar = !bPreviewRadar;
UpdateToggleStatus();
return true;
}
function bool DrawBlend(Canvas C)
{
return true;
}
function UpdateToggleStatus()
{
if ( bPreviewRadar )
{
b_TogglePreview.Caption = ShowScreenText;
DisableComponent(sl_RadarScale);
DisableComponent(fl_PositionX);
DisableComponent(fl_PositionY);
EnableComponent(sl_IconScale);
EnableComponent(sl_RadarTrans);
i_Preview.bNeverScale = false;
sb_Preview.bInit = true;
i_PreviewBlend.OnDraw = DrawBlend;
}
else
{
b_TogglePreview.Caption = ShowRadarText;
EnableComponent(sl_RadarScale);
EnableComponent(fl_PositionX);
EnableComponent(fl_PositionY);
DisableComponent(sl_IconScale);
DisableComponent(sl_RadarTrans);
i_Preview.bNeverScale = true;
i_PreviewBlend.OnDraw = None;
}
}
event ResolutionChanged(int ResX, int ResY)
{
UpdateToggleStatus();
Super.ResolutionChanged(ResX,ResY);
}
defaultproperties
{
WinWidth=0.944062
WinHeight=0.867814
WinLeft=0.029688
WinTop=0.050000
bPreviewRadar=true
ShowScreenText="Show Entire Screen"
ShowRadarText="Show Only Radar"
DefaultRadarTextureName="ONS-Torlan.myLevel.BackgroundImage"
Begin Object class=GUISectionBackground name=RadarPositionBackground
Caption="Radar Position"
bBoundToParent=True
bScaleToParent=True
WinWidth=0.385772
WinHeight=0.221081
WinLeft=0.022134
WinTop=0.749726
NumColumns=2
ColPadding=0.05
// bDebugging=true
End Object
sb_Position=RadarPositionBackground
Begin Object Class=GUIImage name=RadarPreviewBlend
WinWidth=0.311700
WinHeight=0.311700
WinLeft=0.076300
WinTop=0.195204
Image=Material'MenuGray'
ImageStyle=ISTY_Stretched
ImageAlign=IMGA_Center
ImageRenderStyle=MSTY_Alpha
RenderWeight=0.1
End Object
i_PreviewBlend=RadarPreviewBlend
Begin Object Class=GUIImage name=RadarPreviewImage
Image=Material'MenuWhite'
ImageStyle=ISTY_Scaled
ImageAlign=IMGA_Center
ImageRenderStyle=MSTY_Alpha
OnDraw=DrawMap
RenderWeight=0.11
End Object
i_Preview=RadarPreviewImage
Begin Object Class=GUISectionBackground name=PreviewBackground
Caption="Preview"
WinWidth=0.385772
WinHeight=0.699076
WinLeft=0.022134
WinTop=0.040869
bFillClient=true
bBoundToParent=True
bScaleToParent=True
// bDebugging=true
End Object
sb_Preview=PreviewBackground
Begin Object class=GUISectionBackground name=OptionBackground
Caption="Onslaught HUD Options"
WinWidth=0.562501
WinHeight=0.931115
WinLeft=0.416250
WinTop=0.040869
bBoundToParent=True
bScaleToParent=True
// bDebugging=true
End Object
sb_Options=OptionBackground
Begin Object class=moFloatEdit name=RadarPosXFloat
MinValue=0.075
MaxValue=1.000000
Step=0.050000
CaptionWidth=0.010000
Caption="X:"
Hint="Adjust the position (left-to-right) of the radar map"
WinWidth=0.139523
WinHeight=0.034570
WinLeft=0.056826
WinTop=0.848623
TabOrder=0
bBoundToParent=True
bScaleToParent=True
OnChange=InternalOnChange
MenuState=MSAT_Disabled
End Object
fl_PositionX=RadarPosXFloat
Begin Object class=moFloatEdit name=RadarPosYFloat
MinValue=0.000000
MaxValue=0.730000
Step=0.050000
CaptionWidth=0.010000
Caption="Y:"
Hint="Adjust the position (top-to-bottom) of the radar map"
WinWidth=0.139523
WinHeight=0.034570
WinLeft=0.056826
WinTop=0.896968
TabOrder=1
bBoundToParent=True
bScaleToParent=True
OnChange=InternalOnChange
MenuState=MSAT_Disabled
End Object
fl_PositionY=RadarPosYFloat
Begin Object Class=GUIButton name=ToggleButton
WinWidth=0.160937
WinHeight=0.098412
WinLeft=0.218035
WinTop=0.771852
OnClick=TogglePreview
bWrapCaption=true
TabOrder=2
End Object
b_TogglePreview=ToggleButton
Begin Object class=moCheckbox name=EnableMap
Caption="Enable Radar Map"
Hint="The radar map is an bird's eye view of the current map, showing indicators for node positions and status"
OnChange=InternalOnChange
bBoundToParent=True
bScaleToParent=True
WinWidth=0.436524
WinHeight=0.06
WinLeft=0.479238
WinTop=0.116915
TabOrder=3
End Object
ch_RadarMap=EnableMap
Begin Object class=moCheckbox name=NodeBeamCheck
Caption="Show Node Beams"
Hint="Display beams of light above nodes which are vulnerable to attack"
OnChange=InternalOnChange
bBoundToParent=True
bScaleToParent=True
WinWidth=0.436524
WinHeight=0.06
WinLeft=0.479238
WinTop=0.225805
TabOrder=4
End Object
ch_NodeBeams=NodeBeamCheck
Begin Object class=moSlider name=RadarScaleSlider
Caption="Radar Map Scale"
Hint="Change the size of the radar map on the HUD"
MinValue=0.1
MaxValue=0.5
bIntSlider=false
OnChange=InternalOnChange
bBoundToParent=True
bScaleToParent=True
WinWidth=0.528751
WinHeight=0.069779
WinLeft=0.431807
WinTop=0.482552
TabOrder=5
End Object
sl_RadarScale=RadarScaleSlider
Begin Object class=moSlider name=IconScaleSlider
Caption="Radar Map Icon Scale"
Hint="Changes the scaling of the icons displayed on the radar map"
MinValue=0
MaxValue=4.0
bIntSlider=false
OnChange=InternalOnChange
bBoundToParent=True
bScaleToParent=True
WinWidth=0.528751
WinHeight=0.069779
WinLeft=0.431807
WinTop=0.591833
TabOrder=6
End Object
sl_IconScale=IconScaleSlider
Begin Object class=moSlider name=RadarTransparencySlider
Caption="Radar Map Opacity"
Hint="Change the opacity of the radar map's background"
MinValue=0
MaxValue=255
bIntSlider=true
OnChange=InternalOnChange
bBoundToParent=True
bScaleToParent=True
WinWidth=0.528751
WinHeight=0.069779
WinLeft=0.431807
WinTop=0.369622
TabOrder=7
End Object
sl_RadarTrans=RadarTransparencySlider
Begin Object Class=GUIButton name=ResetButton
WinWidth=0.136349
WinHeight=0.063881
WinLeft=0.465241
WinTop=0.898800
Caption="Defaults"
Hint="Restore all settings to their default value."
OnClick=InternalOnClick
bStandardized=true
bBoundToParent=True
bScaleToParent=True
TabOrder=8
End Object
b_Reset=ResetButton
Begin Object class=GUIButton Name=CancelButton
WinWidth=0.136349
WinHeight=0.063881
WinLeft=0.658306
WinTop=0.898800
Caption="Cancel"
Hint="Click to close this menu, discarding changes."
bStandardized=true
OnClick=InternalOnClick
bBoundToParent=True
bScaleToParent=True
TabOrder=9
End Object
b_Cancel=CancelButton
Begin Object class=GUIButton Name=OKButton
WinWidth=0.136349
WinHeight=0.063881
WinLeft=0.802881
WinTop=0.898800
Caption="OK"
Hint="Click to close this menu, saving changes."
OnClick=InternalOnClick
bBoundToParent=True
bScaleToParent=True
bStandardized=true
TabOrder=10
End Object
b_OK=OKButton
}*/

View file

@ -0,0 +1,426 @@
//==============================================================================
// Created on: 10/21/2003
// Special list for directory structures
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class DirectoryTreeList extends GUIVertList;
var() editconst StreamInterface FileManager;
var() editconst StreamDirectoryNode Root;
var() editconst StreamDirectoryNode Current;
var() config bool bSimpleFileBrowsing;
function InitComponent(GUIController MyController, GUIComponent MyOwner )
{
Super.InitComponent(MyController, MyOwner);
CreateRoot();
SetCurrent(Root);
}
function CreateRoot()
{
if ( Root != None )
return;
Root = new(Self) class'StreamDirectoryNode';
Root.SetName("root");
Root.InitializeNode();
}
function SetCurrent( StreamDirectoryNode Node )
{
local string Path;
if ( Node == None )
Node = Root;
Current = Node;
Path = Current.GetPath();
if ( Path == "" )
Path = "*";
if ( FileManager != None )
FileManager.ChangeDirectory(Path);
}
function bool InternalOnClick(GUIComponent Sender)
{
return Super.InternalOnClick(Sender);
}
function InternalOnDrawItem(Canvas C, int Item, float X, float Y, float XL, float YL, bool bIsSelected, bool bIsPending)
{
local string Text;
local bool bIsDrop;
Text = VisibleNodeText(Item);
bIsDrop = Top + Item == DropIndex;
if (bIsSelected || (bIsPending && !bIsDrop))
{
if (SelectedStyle!=None)
{
if (SelectedStyle.Images[MenuState] != None)
SelectedStyle.Draw(C,MenuState, X, Y, XL, YL);
else
{
C.SetPos(X, Y);
C.DrawTile(Controller.DefaultPens[0], XL, YL,0,0,32,32);
}
}
else
{
// Display the selection
if ( (MenuState==MSAT_Focused) || (MenuState==MSAT_Pressed) )
{
C.SetPos( X, Y );
if (SelectedImage==None)
C.DrawTile(Controller.DefaultPens[0], XL, YL,0,0,32,32);
else
{
C.SetDrawColor(SelectedBKColor.R, SelectedBKColor.G, SelectedBKColor.B, SelectedBKColor.A);
C.DrawTileStretched(SelectedImage, XL, YL);
}
}
}
}
if (bIsPending && OutlineStyle != None )
{
if ( OutlineStyle.Images[MenuState] != None )
{
if ( bIsDrop )
OutlineStyle.Draw(C, MenuState, X+1, Y+1, XL - 2, YL-2);
else
{
OutlineStyle.Draw(C, MenuState, X, Y, XL, YL);
if (DropState == DRP_Source)
OutlineStyle.Draw(C, MenuState, Controller.MouseX - MouseOffset[0], Controller.MouseY - MouseOffset[1] + Y - ClientBounds[1], MouseOffset[2] + MouseOffset[0], ItemHeight);
}
}
}
if ( bIsSelected && SelectedStyle != None )
SelectedStyle.DrawText( C, MenuState, X, Y, XL, YL, TXTA_Left, Text, FontScale );
else Style.DrawText( C, MenuState, X, Y, XL, YL, TXTA_Left, Text, FontScale );
}
function int FindVisibleItemIndex( string Path )
{
return Current.FindVisibleNodeIndex(Path);
}
function string Get( optional bool bFullPath )
{
local string Path, File;
if ( IsValid() )
{
if ( bFullPath )
{
File = Current.NodeText(Index,True);
Path = Current.GetPath();
if ( Path == "" || File == "." || File == ".." )
return "";
return Path $ File;
}
return Current.NodeText(Index,True);
}
return "";
}
// Specify true for bGuarantee to receive the selected item if there are no "pending" items
function array<string> GetPendingItems(optional bool bGuarantee)
{
local int i;
local array<string> Items;
local string str;
if ( (DropState == DRP_Source && Controller.DropSource == Self) || bGuarantee )
{
for ( i = 0; i < SelectedItems.Length; i++ )
if ( IsValidIndex(SelectedItems[i]) )
{
str = GetItemAtIndex(SelectedItems[i]);
if ( str != "" )
Items[Items.Length] = str;
}
if ( Items.Length == 0 && IsValid() )
{
str = GetItemAtIndex(Index);
if ( str != "" )
Items[0] = str;
}
}
return Items;
}
function string GetItemAtIndex( int idx )
{
local string Path, File;
local StreamDirectoryNode Node;
if ( IsValidIndex(idx) )
{
Node = VisibleNode(idx);
File = Node.NodeText(idx,True);
Path = Node.GetPath();
// log("GetItemIndex idx:"$idx@"Path:"$Path@"File:"$File);
if ( Path == "" || File == "." || File == ".." )
return "";
if ( class'StreamBase'.static.HasExtension(File) )
return Path $ File;
else return Path;
}
return "";
}
function string GetCurrentNode()
{
return Current.GetName();
}
function string GetCurrentNodePath()
{
return Current.GetPath();
}
function string GetPath()
{
return GetPathAt(Index);
}
function string GetPathAt( int idx )
{
local StreamDirectoryNode Node;
if ( IsValidIndex(idx) )
{
Node = VisibleNode(idx);
if ( Node != None )
return Node.GetPath();
}
return "";
}
function bool ChDir( string Path )
{
local StreamDirectoryNode Node;
// log("ChDir:"@Path,'MusicPlayer');
if ( Current.ChangeDirectory(Path, Node) || Root.ChangeDirectory(Path,Node,True) )
{
SetCurrent(Node);
UpdateItemCount();
SetTopItem(0);
SetIndex(-1);
// log("Current now '"$Current.GetName()$"'",'MusicPlayer');
return true;
}
return false;
}
function bool ExpandNode( string Path )
{
local StreamDirectoryNode Node;
if ( Path == "" )
return false;
Node = FindNode(Path);
if ( Node != None )
{
Node.Toggle();
// log("ExpandNode '"$ Path $"' now"@Node.IsOpen(),'MusicPlayer');
UpdateItemCount(True);
return true;
}
log("ExpandNode() Error: node not found '"$Path$"'",'MusicPlayer');
return false;
}
private function StreamDirectoryNode VisibleNode( int VisibleItemIndex )
{
/* local int i, count;
if ( TreeBase.Length <= 0 )
return None;
count = TreeBase[i].Cost();
while ( count < VisibleItemIndex && ++i < TreeBase.Length )
count += TreeBase[i].Cost();
VisibleItemIndex = count - VisibleItemIndex;
*/ return Current.FindVisibleNode(VisibleItemIndex);
}
private function string VisibleNodeText( int VisibleItemIndex )
{
/* local int i, count;
if ( TreeBase.Length <= 0 )
return "";
count = TreeBase[0].Cost();
while ( count < VisibleItemIndex && ++i < TreeBase.Length )
count += TreeBase[i].Cost();
// log(Name@"VisibleNodeText VisibleItemIndex:"$VisibleItemIndex@"count:"$count@"i:"$i@"TreeBase.Length:"$TreeBase.Length);
VisibleItemIndex = count - VisibleItemIndex;
*/ return Current.NodeText(VisibleItemIndex);
}
function UpdateItemCount( optional bool bFullUpdate )
{
Current.UpdateCost( bFullUpdate );
ItemCount = Current.Cost();
}
function bool AddNode( StreamDirectoryNode Parent, string InName, optional bool bIsFile )
{
// log(Name@"AddNode Parent "$Parent@" Name "$InName@" File "$bIsFile,'MusicPlayer');
if ( Parent == None )
{
if ( Right(InName,1) != ":" && Right(InName,2) != ":\\" )
return false;
Parent = Root;
}
if ( bIsFile )
return Parent.AddContent(InName);
return Parent.AddChild(InName) != None;
}
function bool RemoveNode( StreamDirectoryNode Parent, StreamDirectoryNode Child)
{
if ( Parent == None )
Parent = Root;
return Parent.RemoveChild(Child);
}
function bool RemoveFile( StreamDirectoryNode Parent, string InFileName )
{
if ( Parent == None )
Parent = Root;
return Parent.RemoveContent(InFileName);
}
function StreamDirectoryNode FindNode( string Path )
{
return Root.FindChildByPath(Path);
}
function MakeVisible(float Perc)
{
UpdateItemCount();
Super.SetTopItem( int((ItemCount-ItemsPerPage) * Perc) );
}
function SetTopItem(int Item)
{
//log("GUIListBase::SetTopItem"@Item@"ItemsPerPage:"$ItemsPerPage);
// UpdateItemCount();
Super.SetTopItem(Item);
/*
Top = Item;
if (Top + ItemsPerPage >= ItemCount)
Top = ItemCount - ItemsPerPage;
if (Top<0)
Top=0;
if ( bNotify )
CheckLinkedObjects(Self);
OnAdjustTop(Self);
*/
}
function bool IsValid()
{
UpdateItemCount();
return Super.IsValid();
}
function bool IsValidIndex( int i )
{
UpdateItemCount();
return Super.IsValidIndex(i);
}
function Clear()
{
Root.Clear( True );
UpdateItemCount();
Super.Clear();
}
function bool HandleDebugExec( string Command, string Params )
{
switch ( Command )
{
case "selected":
log("Selected item:"$Get(),'MusicPlayer');
return true;
case "selectedpath":
log("Selected path:"$GetPath(),'MusicPlayer');
return true;
case "visiblenode":
log("Visible Node"@Params$" '"$VisibleNodeText(int(Params))$"'",'MusicPlayer');
return true;
}
return Current.HandleDebugExec(Command,Params);
}
// Called on the drop source when when an Item has been dropped. bAccepted tells it whether
// the operation was successful or not.
// This version of OnEndDrag() does not remove the items from the directory list
function InternalOnEndDrag(GUIComponent Accepting, bool bAccepted)
{
// log(Name@"InternalOnEndDrag Accepting:"$Accepting@"bAccepted:"$bAccepted,'DebugRon');
if (bAccepted && Accepting != None)
bRepeatClick = False;
// Simulate repeat click if the operation was a failure to prevent InternalOnMouseRelease from clearing
// the SelectedItems array
// This way we don't lose the items we clicked on
if (Accepting == None)
bRepeatClick = True;
SetOutlineAlpha(255);
if ( bNotify )
CheckLinkedObjects(Self);
}
DefaultProperties
{
bSimpleFileBrowsing=True
OnDrawItem=InternalOnDrawItem
OnEndDrag=InternalOnEndDrag
}

View file

@ -0,0 +1,87 @@
//==============================================================================
// Created on: 10/21/2003
// Description
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class DirectoryTreeListBox extends GUIListBoxBase;
var DirectoryTreeList List;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.Initcomponent(MyController, MyOwner);
if (DefaultListClass != "")
{
List = DirectoryTreeList(AddComponent(DefaultListClass));
if (List == None)
{
log(Name$".InitComponent - Could not create default list ["$DefaultListClass$"]");
return;
}
}
if (List == None)
{
Warn("Could not initialize list!");
return;
}
InitBaseList(List);
}
function InitBaseList(GUIListBase LocalList)
{
if ((List == None || List != LocalList) && GUIList(LocalList) != None)
List = DirectoryTreeList(LocalList);
List.OnClick=InternalOnClick;
List.OnClickSound=CS_Click;
List.OnDblClick=InternalOnDblClick;
List.OnChange=InternalOnChange;
Super.InitBaseList(LocalList);
}
function bool InternalOnClick(GUIComponent Sender)
{
List.InternalOnClick(Sender);
OnClick(Self);
return true;
}
function bool InternalOnDblClick(GUIComponent Sender)
{
// List.InternalOnDblClick(Sender);
// OnDblClick(Self);
return true;
}
function InternalOnChange(GUIComponent Sender)
{
if (Controller != None && Controller.bCurMenuInitialized)
OnChange(Self);
}
function int ItemCount()
{
return List.ItemCount;
}
function bool MyOpen(GUIContextMenu Menu, GUIComponent ContextMenuOwner)
{
return HandleContextMenuOpen(self, Menu, ContextMenuOwner);
}
function bool MyClose(GUIContextMenu Sender)
{
return HandleContextMenuClose(Sender);
}
DefaultProperties
{
StyleName="NoBackground"
DefaultListClass="GUI2K4.DirectoryTreeList"
}

View file

@ -0,0 +1,79 @@
//==============================================================================
// Created on: 09/16/2003
// Edit the IP and port of an existing favorite
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class EditFavoritePage extends UT2k4Browser_OpenIP;
var automated GUILabel l_name;
var GameInfo.ServerResponseLine Server;
var localized string UnknownText;
function HandleParameters(string ServerIP, string ServerName)
{
if (ServerIP != "")
ed_Data.SetText(StripProtocol(ServerIP));
if ( ServerName == "" )
ServerName = UnknownText;
l_Name.Caption = ServerName;
}
function ApplyURL( string URL )
{
local string IP, port;
if ( URL == "" )
return;
URL = StripProtocol(URL);
if ( !Divide( URL, ":", IP, Port ) )
{
IP = URL;
Port = "7777";
}
Server.IP = IP;
Server.Port = int(Port);
Server.QueryPort = Server.Port + 1;
Server.ServerName = l_name.Caption;
Controller.CloseMenu(False);
}
defaultproperties
{
OKButtonHint="Close the page and save the new IP to your favorites list."
CancelButtonHint="Close the page and discard any changes."
EditBoxHint="Enter the URL for this favorite - separate IP and port with the : symbol"
Begin Object Class=GUILabel Name=ServerName
StyleName="TextLabel"
TextAlign=TXTA_Center
WinWidth=0.854492
WinHeight=0.050000
WinLeft=0.070313
WinTop=0.299479
End Object
l_name=ServerName
Begin Object class=moEditBox Name=IpEntryBox
Caption="IP Address: "
LabelJustification=TXTA_Left
ComponentJustification=TXTA_Left
CaptionWidth=0.35
ComponentWidth=-1
WinWidth=0.590820
WinHeight=0.030000
WinLeft=0.192383
WinTop=0.487500
TabOrder=0
bAutoSizeCaption=True
End Object
ed_Data=IPEntryBox
UnknownText="Unknown Server"
}

View file

@ -0,0 +1,269 @@
//==============================================================================
// Base Class for different filter layouts
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class FilterPageBase extends LargeWindow;
var globalconfig float FilterSplitterPosition;
var BrowserFilters FM;
var GUIMultiOptionList li_Filter;
var UT2K4FilterControlPanel cp_Filter;
var int Index; // BrowserFilter index of selected filter
var array<CacheManager.MutatorRecord> MutatorRecords;
var automated GUISplitter sp_Filter;
var automated GUIImage i_BG;
var bool bNeedRefresh;
var localized string SaveString;
var string CurrentGameType;
function InitComponent(GUIController MyC, GUIComponent MyO)
{
Super.InitComponent(MyC, MyO);
li_Filter = cp_Filter.li_Filters;
}
function ApplyRules(int FilterIndex, optional bool bRefresh);
function int FindFilterMasterIndex(int i)
{
return FM.FindFilterIndex(li_Filter.GetItem(i).Caption);
}
event Opened(GUIComponent Sender)
{
CheckFM();
Super.Opened(Sender);
InitFilterList();
}
// TODO: this function needs to be improved.
function CreateTemplateFilter(string TemplateName, array<GameInfo.KeyValuePair> RuleSet)
{
local int i, idx;
local string QueryType, RuleType;
AddNewFilter(TemplateName);
idx = FM.FindFilterIndex(TemplateName);
for (i = 0; i < RuleSet.Length; i++)
{
if ( !CreateTemplateRule( RuleSet[i], QueryType, RuleType ) )
continue;
FM.SetRule(idx, -1, "", RuleSet[i].Key, RuleSet[i].Value, RuleType, QueryType);
}
li_Filter.SetIndex(idx);
}
// If valid parameters are updated in the master server, they must also be updated here.
function bool CreateTemplateRule( out GameInfo.KeyValuePair Rule, out string QueryType, out string RuleType )
{
if ( Rule.Key ~= "IP" || Rule.Key ~= "adminname" || Rule.Key ~= "adminemail" )
return false;
if ( IsNumber(Rule.Value) )
{
RuleType = "DT_Ranged";
QueryType = "QT_LessThanEquals";
}
else if ( Rule.Value ~= "true" || Rule.Value ~= "false" )
{
RuleType = "DT_Unique";
QueryType = "QT_Equals";
}
else if ( Rule.Key ~= "mutator" )
{
RuleType = "DT_Multiple";
QueryType = "QT_Equals";
}
else
{
RuleType = "DT_Unique";
QueryType = "QT_Equals";
}
return true;
}
function bool IsNumber(string Test)
{
if (int(Test) == 0 && Left(Test,1) != "0")
return false;
return true;
}
function InitFilterList()
{
local array<string> FilterNames;
local moCheckbox ch;
local int i;
li_Filter.Clear();
FilterNames = FM.GetFilterNames();
for (i = 0; i < FilterNames.Length; i++)
{
ch = moCheckBox(li_Filter.AddItem("XInterface.moCheckbox",,FilterNames[i]));
if (ch != None)
ch.Checked(FM.IsActiveAt(i));
}
}
function bool AddNewFilter(out string NewFilterName, optional bool bFocus)
{
if ( FM.AddCustomFilter(NewFilterName) )
{
li_Filter.AddItem( "XInterface.moCheckBox",,NewFilterName );
if ( bFocus )
li_Filter.SetIndex( li_Filter.Find(NewFilterName) );
return true;
}
return false;
}
function bool RemoveExistingFilter(string FilterName)
{
if (FilterName != "" && li_Filter.ValidIndex(li_Filter.Index))
{
if ( FM.RemoveFilter(FilterName) )
{
li_Filter.RemoveItem(li_Filter.Index);
return true;
}
}
return false;
}
function bool RenameFilter(int Index, string NewName)
{
if (li_Filter.ValidIndex(Index) && NewName != "")
{
if (FM.RenameFilter(Index, NewName))
{
li_Filter.Get().SetCaption(NewName);
return true;
}
}
return false;
}
function bool CopyFilter( int Index, out string NewName )
{
if ( li_Filter.ValidIndex(Index) && NewName != "" )
{
if ( FM.CopyFilter(Index, NewName) )
{
li_Filter.AddItem( "XInterface.moCheckbox",,NewName );
li_Filter.SetIndex( li_Filter.Find(NewName) );
return true;
}
}
return false;
}
function SaveFilters()
{
FM.SaveFilters();
}
function ResetFilters()
{
FM.ResetFilters();
InitFilterList();
}
function CheckFM()
{
if (FM == None)
FM = UT2K4ServerBrowser(ParentPage).FilterMaster;
}
function InternalOnChange(GUIComponent Sender)
{
local int i;
local moCheckbox Sent;
if (Sender == li_Filter) // selected a different filter
{
if (li_Filter.ValidIndex(li_Filter.Index))
{
Sent = moCheckbox(li_Filter.Get());
i = FM.FindFilterIndex(Sent.Caption);
if (Sent.IsChecked() != FM.IsActiveAt(i))
FM.ActivateFilter(i,Sent.IsChecked());
ApplyRules(i);
}
else ApplyRules(-1);
}
}
event Closed(GUIComponent Sender, bool bCancelled)
{
if ( bCancelled )
FM.ResetFilters();
else
{
SaveFilters();
Index = -1;
bNeedRefresh = True;
}
Super.Closed(Sender,bCancelled);
}
// Splitter delegates
function InternalOnLoad(GUIComponent Sender, string S)
{
if (Sender == sp_Filter)
sp_Filter.SplitPosition = FilterSplitterPosition;
}
function InternalOnCreateComponent(GUIComponent NewComp, GUIComponent Sender)
{
if (GUISplitter(Sender) != None)
{
if (UT2K4FilterControlPanel(NewComp) != None)
{
cp_Filter = UT2K4FilterControlPanel(NewComp);
cp_Filter.p_Anchor = Self;
cp_Filter.OnChange = InternalOnChange;
}
}
if ( Sender == Self )
Super.InternalOnCreateComponent(NewComp,Sender);
}
DefaultProperties
{
Index=-1
OnCreateComponent=InternalOnCreateComponent
StyleName="TabBackground"
SaveString="Setting saved successfully!"
FilterSplitterPosition=0.369766
PropagateVisibility=False
WinWidth=0.909375
WinHeight=0.904492
WinLeft=0.040430
WinTop=0.036198
}

View file

@ -0,0 +1,547 @@
//==============================================================================
// Created on: 10/15/2003
// *cough*UWindows2*cough*
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class FloatingWindow extends PopupPageBase;
var automated GUIHeader t_WindowTitle;
var() GUIButton b_ExitButton;
var() localized string WindowName;
var() float MinPageWidth, MinPageHeight, MaxPageHeight, MaxPageWidth;
var() editconst bool bResizeWidthAllowed, bResizeHeightAllowed, bResizing, bMoveAllowed, bMoving;
var() editconst bool TSizing, RSizing, LSizing, BtSizing,
TLSizing, TRSizing, BRSizing, BLSizing;
var() config float DefaultLeft, DefaultTop, DefaultWidth, DefaultHeight;
var() int HeaderMouseCursorIndex;
function InitComponent( GUIController MyController, GUIComponent MyOwner )
{
Super.InitComponent( MyController, MyOwner );
t_WindowTitle.SetCaption(WindowName);
if ( bMoveAllowed )
{
// Set bAcceptsInput so that it will become the Controller's active control when moused over
t_WindowTitle.bAcceptsInput = True;
t_WindowTitle.MouseCursorIndex = HeaderMouseCursorIndex;
}
AddSystemMenu();
i_FrameBG.OnPreDraw=AlignFrame;
}
function bool AlignFrame(Canvas C)
{
i_FrameBG.WinHeight = i_FrameBG.RelativeHeight(ActualHeight() - t_WindowTitle.ActualHeight()*0.5);
i_FrameBG.WinTop = i_FrameBG.RelativeTop(ActualTop() + t_WindowTitle.ActualHeight()*0.5);
return bInit;
}
function AddSystemMenu()
{
local eFontScale tFontScale;
b_ExitButton = GUIButton(t_WindowTitle.AddComponent( "XInterface.GUIButton" ));
b_ExitButton.Style = Controller.GetStyle("CloseButton",tFontScale);
b_ExitButton.OnClick = XButtonClicked;
b_ExitButton.bNeverFocus=true;
b_ExitButton.FocusInstead = t_WindowTitle;
b_ExitButton.RenderWeight=1;
b_ExitButton.bScaleToParent=false;
b_ExitButton.OnPreDraw = SystemMenuPreDraw;
// Do not want OnClick() called from MousePressed()
b_ExitButton.bRepeatClick = False;
}
function bool SystemMenuPreDraw(canvas Canvas)
{
b_ExitButton.SetPosition( t_WindowTitle.ActualLeft() + (t_WindowTitle.ActualWidth()-35), t_WindowTitle.ActualTop(), 24, 24, true);
return true;
}
function CheckBounds()
{
local float AH, AW, AL, AT;
AW = FClamp(ActualWidth(), 0.0, Controller.ResX);
AH = FClamp(ActualHeight(), 0.0, Controller.ResY);
AT = FClamp(ActualTop(), 0.0, Controller.ResY - AH);
AL = FClamp(ActualLeft(), 0.0, Controller.ResX - AW);
SetPosition( AL, AT, AW, AH, True );
}
function SetDefaultPosition()
{
local float RH, RW;
if ( !bPositioned )
return;
bInit = False;
if ( !bResizeWidthAllowed )
DefaultWidth = WinWidth;
if ( !bResizeHeightAllowed )
DefaultHeight = WinHeight;
if ( !bMoveAllowed )
{
DefaultLeft = WinLeft;
DefaultTop = WinTop;
}
RW = FClamp( RelativeWidth(DefaultWidth), RelativeWidth(MinPageWidth), RelativeWidth(MaxPageWidth) );
RH = FClamp( RelativeHeight(DefaultHeight), RelativeHeight(MinPageHeight), RelativeHeight(MaxPageHeight) );
SetPosition(
FClamp( RelativeLeft(DefaultLeft), 0.0, RelativeLeft(Controller.ResX) - RW),
FClamp( RelativeTop(DefaultTop), 0.0, RelativeTop(Controller.ResY) - RH),
RW, RH );
}
function InternalOnCreateComponent(GUIComponent NewComp, GUIComponent Sender)
{
if ( Sender == Self )
{
NewComp.bBoundToParent = True;
NewComp.bScaleToParent = True;
if ( !bResizeHeightAllowed && bResizeWidthAllowed )
NewComp.ScalingType = SCALE_X;
else if ( !bResizeWidthAllowed && bResizeHeightAllowed )
NewComp.ScalingType = SCALE_Y;
}
}
event SetFocus(GUIComponent Who)
{
if ( UT2K4GUIController(Controller) != None )
UT2K4GUIController(Controller).SetFocusTo(Self);
Super.SetFocus(Who);
}
function FloatingMousePressed( GUIComponent Sender, bool bRepeat )
{
if ( Controller == None || bRepeat )
return;
// If ResizeAllowed, set bCaptureMouse in order to receive OnCapturedMouseMove() calls
TSizing = bResizeHeightAllowed && HoveringTopBorder();
RSizing = bResizeWidthAllowed && HoveringRightBorder();
LSizing = bResizeWidthAllowed && HoveringLeftBorder();
BtSizing = bResizeHeightAllowed && HoveringBottomBorder();
bMoving = bMoveAllowed && Controller.ActiveControl == t_WindowTitle && !(TSizing || RSizing || BtSizing || LSizing);
if ( TSizing )
{
if ( RSizing || LSizing )
{
TRSizing = RSizing;
TLSizing = LSizing;
TSizing = False;
RSizing = False;
LSizing = False;
}
}
else if ( BtSizing )
{
if ( RSizing || LSizing )
{
BRSizing = RSizing;
BLSizing = LSizing;
BtSizing = False;
RSizing = False;
LSizing = False;
}
}
if ( bMoving )
{
SetMouseCursorIndex(1);
UpdateOffset(ClientBounds[0], ClientBounds[1], ClientBounds[2], ClientBounds[3]);
}
bResizing = bMoving || TSizing || TRSizing || RSizing || BRSizing || BtSizing || BLSizing || LSizing || TLSizing;
bCaptureMouse = bResizing;
t_WindowTitle.bCaptureMouse = bCaptureMouse;
}
function FloatingMouseRelease( GUIComponent Sender )
{
local bool bSave;
// Unset bCaptureMouse
bSave = bCaptureMouse;
bResizing = False;
bCaptureMouse = False;
t_WindowTitle.bCaptureMouse = False;
if ( bMoving )
{
SetPosition( Controller.MouseX - MouseOffset[0], Controller.MouseY - MouseOffset[1], WinWidth, WinHeight, True );
CheckBounds();
}
// Reset sizing vars
bMoving = False;
TSizing = False;
BtSizing = False;
RSizing = False;
LSizing = False;
TLSizing = False;
BLSizing = False;
TRSizing = False;
BRSizing = False;
SetMouseCursorIndex(default.MouseCursorIndex);
UpdateOffset( -1, -1, -1, -1 );
if ( bSave )
SaveCurrentPosition();
}
function SaveCurrentPosition()
{
DefaultLeft = WinLeft;
DefaultTop = WinTop;
DefaultWidth = WinWidth;
DefaultHeight = WinHeight;
SaveConfig();
}
function bool FloatingHover( GUIComponent Sender )
{
if ( !ResizeAllowed() )
return false;
if ( bCaptureMouse )
return true;
// If mouse is near a border, allow resizing
if ( bResizeHeightAllowed && bResizeWidthAllowed && (BLSizing || TRSizing || HoveringBottomLeft()) )
SetMouseCursorIndex(2);
else if ( bResizeHeightAllowed && bResizeWidthAllowed && (TLSizing || BRSizing || HoveringTopLeft()) )
SetMouseCursorIndex(4);
else if ( bResizeHeightAllowed && (TSizing || BtSizing || HoveringTopBorder() || HoveringBottomBorder()) )
SetMouseCursorIndex(3);
else if ( bResizeWidthAllowed && (LSizing || RSizing || HoveringLeftBorder() || HoveringRightBorder()) )
SetMouseCursorIndex(5);
else SetMouseCursorIndex(default.MouseCursorIndex);
return true;
}
function SetPanelPosition(Canvas C);
function bool FloatingPreDraw( Canvas C )
{
local float OldW, OldH, DiffX, DiffY, AW, AT, AH, AL;
InternalOnPreDraw(C);
if ( bInit )
SetDefaultPosition();
if ( !bCaptureMouse || bMoving )
return false;
SetPanelPosition(C);
AL = ActualLeft();
AT = ActualTop();
AW = ActualWidth();
AH = ActualHeight();
OldH = AH;
OldW = AW;
// Top Left
if( TLSizing )
{
DiffX = Controller.MouseX - AL;
DiffY = Controller.MouseY - AT;
WinWidth = RelativeWidth( FClamp( AW - DiffX, ActualWidth(MinPageWidth), ActualWidth(MaxPageWidth) ) );
WinHeight = RelativeHeight(FClamp(AH - DiffY, ActualHeight(MinPageHeight), ActualHeight(MaxPageHeight)));
SetPosition( AL + OldW - ActualWidth(),
AT + OldH - ActualHeight(),
WinWidth,
WinHeight,
True );
ResizedBoth();
return true;
}
if ( TRSizing )
{
DiffX = Controller.MouseX - (AL + AW);
DiffY = Controller.MouseY - AT;
WinHeight = RelativeHeight(FClamp(AH - DiffY, ActualHeight(MinPageHeight), ActualHeight(MaxPageHeight)));
SetPosition( WinLeft,
(AT + OldH) - ActualHeight(),
FClamp(AW + DiffX, ActualWidth(MinPageWidth), ActualWidth(MaxPageWidth)),
WinHeight,
True );
ResizedBoth();
return true;
}
if ( BLSizing )
{
DiffX = Controller.MouseX - AL;
DiffY = Controller.MouseY - (AT + AH);
WinWidth = RelativeWidth( FClamp(AW - DiffX, ActualWidth(MinPageWidth), ActualWidth(MaxPageWidth)) );
SetPosition( (AL + OldW) - ActualWidth(),
WinTop,
WinWidth,
FClamp(AH + DiffY, ActualHeight(MinPageHeight), ActualHeight(MaxPageHeight)),
True );
ResizedBoth();
return true;
}
if ( BRSizing )
{
DiffX = Controller.MouseX - (AL + AW);
DiffY = Controller.MouseY - (AT + AH);
SetPosition( WinLeft,
WinTop,
FClamp(AW + DiffX, ActualWidth(MinPageWidth), ActualWidth(MaxPageWidth)),
FClamp(AH + DiffY, ActualHeight(MinPageHeight), ActualHeight(MaxPageHeight)),
True );
ResizedBoth();
return true;
}
// Top
if ( TSizing )
{
DiffY = Controller.MouseY - AT;
WinHeight = RelativeHeight( FClamp(AH - DiffY, ActualHeight(MinPageHeight), ActualHeight(MaxPageHeight)));
SetPosition( WinLeft,
(AT + OldH) - ActualHeight(),
WinWidth,
WinHeight,
True );
ResizedHeight();
return true;
}
// Left
if( LSizing )
{
DiffX = Controller.MouseX - AL;
WinWidth = RelativeWidth( FClamp(AW - DiffX, ActualWidth(MinPageWidth), ActualWidth(MaxPageWidth)) );
SetPosition( (AL + OldW) - ActualWidth(),
WinTop,
WinWidth,
WinHeight,
True );
ResizedWidth();
return true;
}
// Right
if( RSizing )
{
DiffX = Controller.MouseX - (AL + AW);
SetPosition( WinLeft,
WinTop,
FClamp(AW + DiffX, ActualWidth(MinPageWidth), ActualWidth(MaxPageWidth)),
WinHeight,
True );
ResizedWidth();
return true;
}
// Bottom
if( BtSizing )
{
DiffY = Controller.MouseY - (AT + AH);
SetPosition( WinLeft,
WinTop,
WinWidth,
FClamp(AH + DiffY, ActualHeight(MinPageHeight), ActualHeight(MaxPageHeight)),
True );
ResizedHeight();
return true;
}
return false;
}
function FloatingRendered( Canvas C )
{
if ( !bMoving )
return;
C.SetPos( FClamp(Controller.MouseX - MouseOffset[0], 0.0, Controller.ResX - ActualWidth()),
FClamp(Controller.MouseY - MouseOffset[1], 0.0, Controller.ResY - ActualHeight()) );
C.SetDrawColor(255,255,255,255);
C.DrawTileStretched( Controller.WhiteBorder, ActualWidth(), ActualHeight() );
}
// =====================================================================================================================
// =====================================================================================================================
// Notification
// =====================================================================================================================
// =====================================================================================================================
event ResolutionChanged( int ResX, int ResY )
{
bInit = True;
Super.ResolutionChanged(ResX,ResY);
}
function ResizedBoth();
function ResizedWidth();
function ResizedHeight();
// =====================================================================================================================
// =====================================================================================================================
// Utility
// =====================================================================================================================
// =====================================================================================================================
function bool ResizeAllowed()
{
return bResizeHeightAllowed || bResizeWidthAllowed;
}
function bool HoveringLeftBorder()
{
if ( Controller == None )
return false;
return Controller.MouseX > (Bounds[0] - 5) && Controller.MouseX < (Bounds[0] + 5);
}
function bool HoveringRightBorder()
{
if ( Controller == None )
return false;
return Controller.MouseX > (Bounds[2] - 5) && Controller.MouseX < (Bounds[2] + 5);
}
function bool HoveringTopBorder()
{
if ( Controller == None )
return false;
return Controller.MouseY > (Bounds[1] - 5) && Controller.MouseY < (Bounds[1] + 5);
}
function bool HoveringBottomBorder()
{
if ( Controller == None )
return false;
return Controller.MouseY > (Bounds[3] - 5) && Controller.MouseY < (Bounds[3] + 5);
}
function bool HoveringTopLeft()
{
return (HoveringLeftBorder() && HoveringTopBorder()) ||
(HoveringRightBorder() && HoveringBottomBorder());
}
function bool HoveringBottomLeft()
{
return (HoveringRightBorder() && HoveringTopBorder()) ||
(HoveringLeftBorder() && HoveringBottomBorder());
}
function bool XButtonClicked( GUIComponent Sender )
{
Controller.CloseMenu(False);
return true;
}
function SetMouseCursorIndex( int NewIndex )
{
MouseCursorIndex = NewIndex;
if ( MouseCursorIndex == default.MouseCursorIndex )
t_WindowTitle.MouseCursorIndex = HeaderMouseCursorIndex;
else t_WindowTitle.MouseCursorIndex = NewIndex;
}
defaultproperties
{
bResizeHeightAllowed=True
bResizeWidthAllowed=True
bMoveAllowed=True
bRequire640x480=False
bRenderWorld=True
bCaptureInput=False
InactiveFadeColor=(R=255,B=255,G=255,A=255)
HeaderMouseCursorIndex=1
Begin Object Class=GUIHeader Name=TitleBar
WinWidth=1
WinHeight=0.043750
WinLeft=0
WinTop=0
RenderWeight=0.1
FontScale=FNS_Small
bUseTextHeight=True
bAcceptsInput=True
bNeverFocus=False
bBoundToParent=true
bScaleToParent=true
OnMousePressed=FloatingMousePressed
OnMouseRelease=FloatingMouseRelease
ScalingType=SCALE_X
End Object
t_WindowTitle=TitleBar
DefaultLeft=0.2
DefaultTop=0.2
DefaultWidth=0.6
DefaultHeight=0.6
MinPageWidth=0.1
MaxPageWidth=1.0
MinPageHeight=0.1
MaxPageHeight=1.0
// The Magic
OnCreateComponent=InternalOnCreateComponent
OnMousePressed=FloatingMousePressed
OnMouseRelease=FloatingMouseRelease
OnHover=FloatingHover
OnPreDraw=FloatingPreDraw
OnRendered=FloatingRendered
// Debugging The Magic
// bDebugging=True
}

View file

@ -0,0 +1,14 @@
class GUI2K4MultiColumnList extends GUIMultiColumnList;
delegate string OnGetSortString(GUIComponent Sender, int item, int column);
function string InternalGetSortString( int i )
{
return OnGetSortString(self, i, SortColumn);
}
defaultproperties
{
GetSortString=InternalGetSortString
SortColumn=0
}

View file

@ -0,0 +1,19 @@
class GUI2K4MultiColumnListBox extends GUIMultiColumnListBox;
delegate string OnGetSortString(GUIComponent Sender, int item, int column);
function InitBaseList(GUIListBase LocalList)
{
Super.InitBaseList(LocalList);
GUI2K4MultiColumnList(List).OnGetSortString = InternalOnGetSortString;
}
function string InternalOnGetSortString(GUIComponent Sender, int item, int column)
{
return OnGetSortString(self, item, column);
}
defaultproperties
{
DefaultListClass="GUI2K4.GUI2K4MultiColumnList"
}

View file

@ -0,0 +1,59 @@
//==============================================================================
// UT2004 Style Question Page
//
// Written by Michiel Hendriks
// (c) 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class GUI2K4QuestionPage extends GUIQuestionPage;
function bool ButtonClick(GUIComponent Sender)
{
local int T;
T = GUIButton(Sender).Tag;
ParentPage.InactiveFadeColor=ParentPage.Default.InactiveFadeColor;
if ( NewOnButtonClick(T) ) Controller.CloseMenu( bool(T & (QBTN_Cancel|QBTN_Abort)) );
OnButtonClick(T);
return true;
}
defaultproperties
{
Begin Object Class=GUIImage Name=imgBack
// if _RO_
// easier to change here than change everywhere else --emh
// Image=Texture'InterfaceArt_tex.Menu.Quitmenu'
// ImageStyle=ISTY_Scaled
// ImageRenderStyle=MSTY_Normal
// else
Image=Texture'KF_InterfaceArt_tex.Menu.Med_border_SlightTransparent'
ImageStyle=ISTY_Stretched
ImageRenderStyle=MSTY_Normal
//DropShadow=Material'2K4Menus.Controls.shadow'
// end if _RO_
DropShadowX=0
DropShadowY=10
WinTop=0.297917
WinLeft=0.100000
WinWidth=0.800000
WinHeight=0.401563
End Object
Begin Object Class=GUILabel Name=lblQuestion
WinTop=0.366483
WinLeft=0.150000
WinWidth=0.700000
WinHeight=0.065714
bMultiLine=true
StyleName="TextLabel"
TextAlign=TXTA_Center
End Object
Controls(0)=imgBack
Controls(1)=lblQuestion
WinTop=0.352899
WinLeft=0.116072
WinWidth=0.765486
WinHeight=0.319917
}

View file

@ -0,0 +1,30 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class GUI2Styles extends GUIStyles;
defaultproperties
{
// if _RO_
/*
// end if _RO_
FontColors(0)=(R=255,G=210,B=0,A=255)
FontColors(1)=(R=255,G=210,B=0,A=255)
FontColors(2)=(R=255,G=255,B=255,A=255)
FontColors(3)=(R=255,G=210,B=0,A=255)
FontColors(4)=(R=133,G=133,B=133,A=255)
// if _RO_
*/
FontColors(0)=(R=225,G=225,B=225,A=255)
FontColors(1)=(R=255,G=255,B=255,A=255)
FontColors(2)=(R=225,G=225,B=225,A=255)
FontColors(3)=(R=225,G=225,B=225,A=255)
FontColors(4)=(R=125,G=125,B=125,A=255)
// end if _RO_
BorderOffsets(0)=0
BorderOffsets(1)=0
BorderOffsets(2)=0
BorderOffsets(3)=0
}

View file

@ -0,0 +1,276 @@
//==============================================================================
// This page displays all values for array properties received from PlayInfo
// TODO Add support for Select render type in playinfo
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class GUIArrayPropPage extends GUICustomPropertyPage;
var() string PropName;
var() array<string> PropValue;
var string MOType;
var automated GUIMultiOptionListBox lb_Values;
var() GUIMultiOptionList li_Values;
var() string Delim, ButtonStyle;
var protected bool bReadOnly;
var() bool bListInitialized;
var automated AltSectionBackground sb_Bk1;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.InitComponent(MyController, MyOwner);
li_Values = lb_Values.List;
sb_Main.bVisible = false;
sb_Bk1.ManageComponent(lb_Values);
}
function SetOwner( GUIComponent NewOwner )
{
local string str;
Super.SetOwner(NewOwner);
PropName = Item.DisplayName;
t_WindowTitle.Caption = PropName;
str = Item.Value;
// Remove extra () and ""
Strip(str, "(");
Strip(str, ")");
if ( Delim == "" )
Delim = ",";
if (Left(str, 1) == "\"")
Delim = "\"" $ Delim $ "\"";
Strip(str, "\"");
Split(str, Delim, PropValue);
}
function SetReadOnly( bool bValue )
{
bReadOnly = bValue;
}
function bool GetReadOnly() { return bReadOnly; }
function string GetDataString()
{
local string Result;
Result = JoinArray( PropValue, Delim );
if ( Left(Delim,1) == "\"" )
Result = "\"" $ Result $ "\"";
Result = "(" $ Result $ ")";
return Result;
}
function bool InternalOnPreDraw(Canvas C)
{
if ( !bListInitialized )
InitializeList();
return Super.InternalOnPreDraw(C);
}
// Create buttons and controls for array members
function InitializeList()
{
local int i;
if ( !li_Values.bPositioned )
return;
bListInitialized = True;
if (Item.RenderType == PIT_Check)
MOType = "XInterface.moCheckBox";
else if (Item.RenderType == PIT_Select)
MOType = "XInterface.moComboBox";
Clear();
for (i = 0; i < PropValue.Length; i++)
AddListItem(i);
UpdateListCaptions();
UpdateListValues();
}
// Creates and sets up the menuoption for one array member
function GUIMenuOption AddListItem(int Index)
{
local GUIMenuOption mo;
mo = li_Values.InsertItem( Index, MOType, , string(Index+1) $ ":" );
mo.CaptionWidth=0.05;
mo.ComponentWidth=0.95;
mo.bAutoSizeCaption = True;
mo.SetReadOnly(bReadOnly);
SetItemOptions(mo);
return mo;
}
function Clear()
{
li_Values.Clear();
}
// Resets the menuoption captions to correspond to the currently displayed members
function UpdateListCaptions()
{
local int i;
for (i = 0; i < li_Values.Elements.Length; i++)
li_Values.Elements[i].SetCaption(i+1 $ ":");
}
// Resets the menuoption values to correspond to the currently displayed array members
function UpdateListValues()
{
local int i;
RemapComponents();
for (i = 0; i < li_Values.Elements.Length && i < PropValue.Length; i++)
li_Values.Elements[i].SetComponentValue(PropValue[i],True);
}
function InternalOnCreateComponent(GUIComponent NewComp, GUIComponent Sender)
{
if (GUIMultiOptionList(NewComp) != None)
{
GUIMultiOptionList(NewComp).bDrawSelectionBorder = False;
GUIMultiOptionList(NewComp).ItemPadding = 0.15;
if (Sender == lb_Values)
lb_Values.InternalOnCreateComponent(NewComp, Sender);
}
else if (GUIButton(NewComp) != None)
{
GUIButton(NewComp).StyleName = ButtonStyle;
GUIButton(NewComp).bAutoSize = True;
}
Super.InternalOnCreateComponent(NewComp,Sender);
}
function InternalOnChange(GUIComponent Sender)
{
if (Sender == li_Values )
{
if ( li_Values.IsValid() )
PropValue[li_Values.Index] = li_Values.Get().GetComponentValue();
}
}
function int GetMaxValue( string MaxLength )
{
local int i, maxl;
local string str;
if ( MaxLength == "" )
return 0;
maxl = int(MaxLength);
for ( i = 0; i < maxl; i++ )
str $= "9";
return int(str);
}
function SetItemOptions( GUIMenuOption mo )
{
local moNumericEdit nu;
local moFloatEdit fl;
local moEditBox ed;
local string str, str1, str2;
nu = moNumericEdit(mo);
fl = moFloatEdit(mo);
ed = moEditBox(mo);
if ( ed != None )
{
if ( Item.Data != "" )
ed.MyEditBox.MaxWidth = int(Item.Data);
}
else if ( fl != None )
{
if ( Item.Data != "" )
{
if ( Divide(Item.Data, ";", str, str1) )
{
fl.MyNumericEdit.MyEditBox.MaxWidth = int(str);
if ( Divide(str1, ":", str, str2) )
fl.Setup(str, str2, fl.Step);
}
else fl.Setup(0, GetMaxValue(Item.Data), fl.Step);
}
}
else if ( nu != None )
{
if ( Item.Data != "" )
{
if ( Divide(Item.Data, ";", str, str1) )
{
nu.MyNumericEdit.MyEditBox.MaxWidth = int(str);
if ( Divide(str1, ":", str, str2) )
nu.Setup(str, str2, fl.Step);
}
else nu.Setup(0, GetMaxValue(Item.Data), nu.Step);
}
}
}
DefaultProperties
{
WinWidth=0.842773
WinHeight=0.750000
WinLeft=0.090429
WinTop=0.145833
OnCreateComponent=InternalOnCreateComponent
Begin Object Class=GUIMultiOptionListBox Name=ValueListBox
NumColumns=1
OnChange=InternalOnChange
OnCreateComponent=InternalOnCreateComponent
bBoundToParent=True
bScaleToParent=True
WinWidth=0.865001
WinHeight=0.714452
WinLeft=0.021250
WinTop=0.140209
TabOrder=0
bVisibleWhenEmpty=True
End Object
lb_Values=ValueListBox
Begin Object class=AltSectionBackground name=BK1
WinWidth=0.762500
WinHeight=0.575000
WinLeft=0.043750
WinTop=0.095833
LeftPadding=0.01
RightPadding=0.15
End Object
sb_BK1=bk1
ButtonStyle="SquareButton"
MOType="XInterface.moEditBox"
}

View file

@ -0,0 +1,81 @@
//==============================================================================
// Created on: 09/17/2003
// Base class for menus which handle custom playinfo properties
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class GUICustomPropertyPage extends LockedFloatingWindow;
// GUIComponent associated with this custom property page
// this will normally be the component that wanted this page opened
// In the case of the playinfo lists, this would be the moButton responsible for tracking this property's value
var() noexport GUIComponent Owner;
var() noexport PlayInfo.PlayInfoData Item; // Playinfo property this item is associated with
function SetOwner( GUIComponent NewOwner )
{
Owner = NewOwner;
}
function GUIComponent GetOwner()
{
return Owner;
}
function SetReadOnly( bool bValue );
function bool GetReadOnly() { return false; }
function Strip(out string Source, string Char)
{
if (Source != "" && Char != "")
{
if (Left(Source,Len(Char)) == Char)
Source = Mid(Source, Len(Char));
if (Right(Source, Len(Char)) == Char)
Source = Left(Source, Len(Source) - Len(Char));
}
}
// copied from GameInfo and modified
static function bool GrabOption( string Delim, out string Options, out string Result )
{
local string s;
s = Options;
if( Left(Options,1)==Delim )
Result = Mid(Options,1);
if ( !Divide(s, Delim, Result, Options) )
Result = s;
return Result != "";
}
//
// Break up a key=value pair into its key and value.
//
static function GetKeyValue( string Pair, out string Key, out string Value )
{
if ( !Divide(Pair, "=", Key, Value) )
Key = Pair;
}
/* ParseOption()
Find an option in the options string and return it.
*/
static function string ParseOption( string Options, string Delim, string InKey )
{
local string Pair, Key, Value;
while( GrabOption( Delim, Options, Pair ) )
{
GetKeyValue( Pair, Key, Value );
if( Key ~= InKey )
return Value;
}
return "";
}

View file

@ -0,0 +1,231 @@
//==============================================================================
// Created on: 11/15/2003
// Specialized array property page for dynamic arrays
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class GUIDynArrayPage extends GUIArrayPropPage;
struct ArrayControl
{
var() GUIButton b_New;
var() GUIButton b_Remove;
};
var() array<ArrayControl> ArrayButton;
var() string SizingCaption;
var() localized string NewText, RemoveText;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.InitComponent(MyController, MyOwner);
li_Values.OnAdjustTop = InternalOnAdjustTop;
SizingCaption = RemoveText;
}
// Create buttons and controls for array members
function InitializeList()
{
local int i;
local float AW, AL, Y;
// ItemsPerPage is set in PreDraw, so if li_Values hasn't received a call to PreDraw() yet, stop here
if ( !li_Values.bPositioned )
return;
bListInitialized = True;
// Unset bInit so that InternalOnPreDraw won't call InitializeList() again
if (Item.RenderType == PIT_Check)
MOType = "XInterface.moCheckBox";
else if (Item.RenderType == PIT_Select)
MOType = "XInterface.moComboBox";
AW = li_Values.ActualWidth();
AL = li_Values.ActualLeft();
Clear();
for (i = 0; i < PropValue.Length; i++)
AddListItem(i);
ArrayButton.Length = li_Values.ItemsPerPage;
Y = li_Values.ClientBounds[1];
for (i = 0; i < li_Values.ItemsPerPage; i++)
{
ArrayButton[i] = AddButton(i);
ArrayButton[i].b_New.WinLeft = ArrayButton[i].b_New.RelativeLeft((AL + AW) + 5);
ArrayButton[i].b_Remove.WinLeft = ArrayButton[i].b_New.WinLeft;
ArrayButton[i].b_New.WinTop = ArrayButton[i].b_New.RelativeTop(Y);
ArrayButton[i].b_Remove.WinTop = ArrayButton[i].b_Remove.RelativeTop(Y);
Y += li_Values.ItemHeight;
}
UpdateListCaptions();
UpdateListValues();
UpdateButtons();
RemapComponents();
}
function ArrayControl AddButton(int Index)
{
local ArrayControl AC;
AC.b_New = GUIButton(AddComponent("XInterface.GUIButton",True));
AC.b_New.TabOrder = Index+1;
AC.b_New.Tag = Index;
AC.b_New.OnClick = InternalOnClick;
AC.b_New.Caption = NewText;
AC.b_New.SizingCaption = SizingCaption;
AC.b_Remove = GUIButton(AddComponent("XInterface.GUIButton",True));
AC.b_Remove.TabOrder = Index+1;
AC.b_Remove.Tag = Index;
AC.b_Remove.OnClick = InternalOnClick;
AC.b_Remove.Caption = RemoveText;
AC.b_Remove.SizingCaption = SizingCaption;
return AC;
}
function Clear()
{
local int i;
for (i = 0; i < ArrayButton.Length; i++)
{
RemoveComponent(ArrayButton[i].b_New, True);
RemoveComponent(ArrayButton[i].b_Remove, True);
}
ArrayButton.Remove(0, ArrayButton.Length);
Super.Clear();
RemapComponents();
}
// Resets the button captions and roles to correspond to the currently displayed array members
// (Makes sure that the last button says "New" while all others say "Remove"
function UpdateButtons()
{
local int i, j;
j = li_Values.Top;
for (i = 0; i < ArrayButton.Length; i++)
{
SetElementState(i, j == li_Values.Elements.Length && j < li_Values.Top + li_Values.ItemsPerPage, j < li_Values.Elements.Length && j < li_Values.Top + li_Values.ItemsPerPage);
SetElementCaption(i, j);
j++;
}
}
protected function SetElementState(int Index, bool bNewOn, bool bRemoveOn)
{
if (Index < 0 || Index >= ArrayButton.Length)
return;
ArrayButton[Index].b_New.TabOrder = Index + 1;
ArrayButton[Index].b_Remove.TabOrder = Index + 1;
if (ArrayButton[Index].b_New.bVisible != bNewOn)
ArrayButton[Index].b_New.SetVisibility(bNewOn);
if (ArrayButton[Index].b_Remove.bVisible != bRemoveOn)
ArrayButton[Index].b_Remove.SetVisibility(bRemoveOn);
if (bNewOn)
EnableComponent(ArrayButton[Index].b_New);
else DisableComponent(ArrayButton[Index].b_New);
if (bRemoveOn)
EnableComponent(ArrayButton[Index].b_Remove);
else DisableComponent(ArrayButton[Index].b_Remove);
}
protected function SetElementCaption(int ButtonArrayIndex, int ListElementIndex)
{
ArrayButton[ButtonArrayIndex].b_New.Caption = NewText;
ArrayButton[ButtonArrayIndex].b_New.Tag = ListElementIndex;
ArrayButton[ButtonArrayIndex].b_Remove.Caption = RemoveText;
ArrayButton[ButtonArrayIndex].b_Remove.Tag = ListElementIndex;
}
function bool InternalOnClick(GUIComponent Sender)
{
local int i;
if ( Super.InternalOnClick(Sender) )
return true;
if (GUIButton(Sender) != None)
{
for (i = 0; i < ArrayButton.Length; i++)
{
if (Sender == ArrayButton[i].b_New)
{
PropValue.Insert(ArrayButton[i].b_New.Tag, 1);
AddListItem(ArrayButton[i].b_New.Tag).SetFocus(None);
break;
}
if (Sender == ArrayButton[i].b_Remove)
{
if (ArrayButton[i].b_Remove.Tag != -1 && ArrayButton[i].b_Remove.Tag < li_Values.Elements.Length)
{
li_Values.RemoveItem(ArrayButton[i].b_Remove.Tag);
PropValue.Remove(ArrayButton[i].b_Remove.Tag, 1);
}
break;
}
}
if (i < ArrayButton.Length)
{
UpdateListCaptions();
UpdateButtons();
RemapComponents();
}
}
return false;
}
function InternalOnAdjustTop(GUIComponent Sender)
{
UpdateButtons();
li_Values.InternalOnAdjustTop(Sender);
}
function bool FloatingPreDraw(Canvas C)
{
local float XL, YL, XL2, YL2;
if ( bInit )
{
b_OK.Style.TextSize(C, MSAT_Blurry, NewText, XL, YL, FNS_Medium);
b_OK.Style.TextSize(C, MSAT_Blurry, RemoveText, XL2, YL2, FNS_Medium);
if ( XL > XL2 )
SizingCaption = NewText;
else SizingCaption = RemoveText;
}
return Super.FloatingPreDraw(C);
}
DefaultProperties
{
NewText="New"
RemoveText="Remove"
}

View file

@ -0,0 +1,80 @@
//==============================================================================
// Base class for filter tab panels that contain PlayInfo settings
//
// Created by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class GUIFilterPanel extends UT2K4PlayInfoPanel DependsOn(CustomFilter);
var string CurrentGame;
var UT2K4CustomFilterPage p_Anchor;
var BrowserFilters FilterMaster;
var array<CustomFilter.AFilterRule> FilterRules;
var string FilterTypeString[7];
function InitComponent(GUIController MyC, GUIComponent MyO)
{
Super.InitComponent(MyC, MyO);
p_Anchor = UT2K4CustomFilterPage(MyO.MenuOwner.MenuOwner);
FilterMaster = p_Anchor.FM;
GamePI = p_Anchor.FilterPI;
}
function bool CanShowPanel()
{
if (p_Anchor == None || FilterMaster == None)
return false;
if (p_Anchor.Index < 0)
return false;
return Super.CanShowPanel();
}
function InitPanel()
{
Super.InitPanel();
Opened(MenuOwner);
}
function AddFilterRule(CustomFilter.AFilterRule NewRule)
{
}
function PopulateFilterTypes(moCombobox NewCombo, bool Ranged)
{
if (NewCombo == None)
{
Warn("Call to PopulateFilterTypes with value None!");
return;
}
NewCombo.ReadOnly(True);
NewCombo.AddItem(FilterTypeString[0],,"QT_Disabled");
if (!Ranged)
{
NewCombo.AddItem(FilterTypeString[1],,"QT_Equals");
NewCombo.AddItem(FilterTypeString[2],,"QT_NotEquals");
return;
}
NewCombo.AddItem(FilterTypeString[3],,"QT_GreaterThan");
NewCombo.AddItem(FilterTypeString[4],,"QT_GreaterThanEquals");
NewCombo.AddItem(FilterTypeString[5],,"QT_LessThan");
NewCombo.AddItem(FilterTypeString[6],,"QT_LessThanEquals");
}
DefaultProperties
{
FilterTypeString(0)="Disabled"
FilterTypeString(1)="Equals"
FilterTypeString(2)="Not"
FilterTypeString(3)="Higher"
FilterTypeString(4)="Or Higher"
FilterTypeString(5)="Lower"
FilterTypeString(6)="Or Lower"
}

View file

@ -0,0 +1,32 @@
// ====================================================================
// (C) 2002, Epic Games
//
//
// The GUIUserModInfo is a class that allows mod authors to create TC/Mod records
// for their mods. Users can then activate the mod from the User Mods menu.
//
// Mod authors subclass this actor in their package. They then need
// to add the following line to their .INT file
//
// Object=(Class=Class,MetaClass=GUI2K4.GUIUserModInfo,Name=ModPackageName.CustomModInfoClassName)
//
//
// ModName is the name of the mod. It will appear in the list of mods.
// ModInfo is the text to display in the Mod Info box.
// ModLogo is the string name of an image to use as a logo for the mod
// ModCmdLine is the command line parameters to use when activating the mod
//
// ====================================================================
class GUIUserModInfo extends GUI
Abstract;
var localized string ModName;
var localized string ModInfo;
var localized string ModLogo;
var localized string ModCmdLine;
defaultproperties
{
}

View file

@ -0,0 +1,293 @@
//==============================================================================
// This version of UT2K4PlayInfoPanel displays PlayInfo settings
// on a single page, subdividing PlayInfo groups into sections
//
// Created by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class IAMultiColumnRulesPanel extends UT2K4PlayInfoPanel;
var automated moCheckBox ch_Advanced; // toggles advanced property display
var automated moButton b_Symbols;
var automated GUIImage i_bk;
var() config string RedSym, BlueSym;
var() string TeamSymbolPage;
var() editconst UT2K4GamePageBase p_Anchor;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.InitComponent(MyController, MyOwner);
// Set a pointer to the parent page for quick-access
if (UT2K4GamePageBase(Controller.ActivePage) != None)
p_Anchor = UT2K4GamePageBase(Controller.ActivePage);
// ch_Advanced.Checked(Controller.bExpertMode);
// if _RO_
// wtf? why does this thing set position absolutely like this
// else
// lb_Rules.SetPosition(0.024912,0.080739, 0.950175,0.713178);
// end if _RO_
li_Rules.ColumnWidth=0.96;
}
function Refresh()
{
local int i;
RedSym = default.RedSym;
BlueSym = default.BlueSym;
bRefresh = True;
bUpdate = True;
SetGamePI();
// Clear any PlayInfo setting from our local copy of the PlayInfoData array
if (InfoRules.Length > 0)
InfoRules.Remove(0, InfoRules.Length);
for ( i = 0; i < GamePI.Settings.Length; i++ )
if ( ShouldDisplayRule(i) )
InfoRules[InfoRules.Length] = GamePI.Settings[i];
ClearRules();
LoadRules();
}
protected function SetGamePI()
{
GamePI = p_Anchor.RuleInfo;
GamePI.Sort(0);
}
// No array index validation!
protected function bool ShouldDisplayRule(int Index)
{
if ( GamePI.Settings[Index].bAdvanced && !Controller.bExpertMode )
return false;
// Remove all multiplayer-only PlayInfo settings - they will be displayed on Server Rules tab, if this is a multiplayer game.
return !GamePI.Settings[Index].bMPOnly;
}
function LoadRules()
{
local int i;
// Now settings in PlayInfo have been sorted by Group
// We can now simply check if this setting's group is different from the last,
// and if so, create a header for it.
for (i = 0; i < InfoRules.Length; i++)
{
if (i == 0 || InfoRules[i].Grouping != InfoRules[i - 1].Grouping)
AddGroupHeader(i,li_Rules.Elements.Length == 0);
// Now add the setting to the GUIMultiOptionList
AddRule(InfoRules[i], i);
}
Super.LoadRules();
if ( GamePI != None )
{
i = GamePI.FindIndex("BotMode");
if ( i != -1 )
UpdateBotSetting(i);
}
UpdateAdvancedCheckbox();
UpdateSymbolButton();
}
protected function StoreSetting( int Index, string NewValue )
{
GamePI.StoreSetting(Index, NewValue);
// Hack for bot setting
if (InStr(GamePI.Settings[Index].SettingName, "BotMode") != -1)
UpdateBotSetting(Index);
}
// mother of all hacks - all just to make sure that in single player, botmode drop down doesn't display
// Use Map Defaults, and MinPlayers setting says "Number of Bots", instead of "Min Players"
function UpdateBotSetting(int BotModeIndex)
{
local int MinPlayerListIndex, MinPlayerIndex;
local moNumericEdit nu;
if ( li_Rules == None || GamePI == None || p_Anchor == None || p_Anchor.c_Tabs == None || BotModeIndex < 0 || BotModeIndex >= GamePI.Settings.Length )
return;
// Find the PlayInfo index of the MinPlayers setting
for ( MinPlayerIndex = 0; MinPlayerIndex < InfoRules.Length; MinPlayerIndex++ )
if ( InStr(InfoRules[MinPlayerIndex].SettingName, "MinPlayers") != -1 )
break;
if ( MinPlayerIndex < InfoRules.Length )
{
// Find the MinPlayers component in the list (caption might be different, so must search by tag)
MinPlayerListIndex = FindComponentWithTag(MinPlayerIndex);
if ( li_Rules.ValidIndex(MinPlayerListIndex) )
nu = moNumericEdit(li_Rules.Elements[MinPlayerListIndex]);
}
p_Anchor.UpdateBotSetting(GamePI.Settings[BotModeIndex].Value, nu);
}
function SymbolConfigClosed(optional bool bCancelled)
{
local TeamSymbolConfig SymConfig;
local Material Sym;
local bool bSave;
SymConfig = TeamSymbolConfig(Controller.ActivePage);
if ( SymConfig.i_RedPreview.Image != None )
Sym = SymConfig.i_RedPreview.Image;
else Sym = None;
if ( Sym != None )
{
bSave = !(string(Sym) ~= RedSym);
RedSym = string(Sym);
}
else if ( RedSym != "" )
{
RedSym = "";
bSave = True;
}
if ( SymConfig.i_BluePreview.Image != None )
Sym = SymConfig.i_BluePreview.Image;
else Sym = None;
if ( Sym != None )
{
bSave = bSave || !(string(Sym) ~= BlueSym);
BlueSym = string(Sym);
}
else if ( BlueSym != "" )
{
BlueSym = "";
bSave = True;
}
if ( bSave )
SaveConfig();
}
function InternalOnChange(GUIComponent Sender)
{
local class<GameInfo> GameClass;
/* if (Sender == ch_Advanced)
{
// Save our preference
Controller.bExpertMode = ch_Advanced.IsChecked();
Controller.SaveConfig();
// Reload the playinfo settings and repopulate the MultiOptionList
p_Anchor.SetRuleInfo();
//reload maplist
p_Anchor.p_Main.InitMaps();
return;
}
else */if ( Sender == b_Symbols )
{
GameClass = class<GameInfo>(GamePI.InfoClasses[0]);
if ( RedSym == "" )
RedSym = string(GameClass.static.GetRandomTeamSymbol(0));
if ( BlueSym == "" )
BlueSym = string(GameClass.static.GetRandomTeamSymbol(10));
if ( Controller.OpenMenu(TeamSymbolPage, RedSym, BlueSym) )
Controller.ActivePage.OnClose = SymbolConfigClosed;
return;
}
Super.InternalOnChange(Sender);
}
function UpdateSymbolButton()
{
if ( p_Anchor.p_Main.GetIsTeamGame() )
EnableComponent(b_Symbols);
else DisableComponent(b_Symbols);
}
function UpdateAdvancedCheckbox()
{
// if ( Controller != None && Controller.bExpertMode != ch_Advanced.IsChecked() )
// ch_Advanced.SetComponentValue( Controller.bExpertMode, true );
}
function string Play()
{
local string S;
if ( RedSym != "" )
S $= "?RedTeamSymbol=" $ RedSym;
if ( BlueSym != "" )
S $= "?BlueTeamSymbol=" $ BlueSym;
return s;
}
DefaultProperties
{
NumColumns=2
TeamSymbolPage="GUI2K4.TeamSymbolConfig"
Begin Object Class=moCheckBox Name=AdvancedButton
OnChange=InternalOnChange
Caption="View Advanced Options"
Hint="Toggles whether advanced properties are displayed"
WinWidth=0.300000
WinHeight=0.040000
WinLeft=0.136725
WinTop=0.948334
TabOrder=1
RenderWeight=1.0
bSquare=True
bBoundToParent=True
bScaleToParent=True
bAutoSizeCaption=True
End Object
// if _KF_
// ch_Advanced=AdvancedButton
// end if _KF_
Begin Object Class=moButton Name=SymbolButton
WinWidth=0.329346
WinHeight=0.056282
WinLeft=0.523664
WinTop=0.936182
ComponentWidth=0.4
bAutoSizeCaption=True
OnChange=InternalOnChange
Caption="Team Symbols"
ButtonCaption="Configure"
Hint="Choose the banner symbols for each team."
TabOrder=2
End Object
b_Symbols=SymbolButton
Begin Object class=GUIImage name=Bk1
WinWidth=0.996997
WinHeight=0.907930
WinLeft=0.000505
WinTop=0.014733
ImageStyle=ISTY_Stretched
Image=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'2K4Menus.Newcontrols.Display99'
End Object
i_BK=BK1
}

View file

@ -0,0 +1,219 @@
//==============================================================================
// Created on: 10/21/2003
// A small menu for viewing/editing ID3 v1/v2 tags
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class ID3TagEditor extends FloatingWindow;
var automated GUIPanel p_Main;
var StreamInterface FileManager;
var StreamInteraction Handler;
var GUIMultiOptionListBox lb_Fields;
var GUIMultiOptionList li_Fields;
var array<AnimatedEditbox> ed_Fields;
var string FileName;
var Stream Stream;
var StreamTag ID3Tag;
var localized string EditBoxHint;
function InitComponent( GUIController MyController, GUIComponent MyOwner )
{
Super.InitComponent(MyController, MyOwner);
p_Main.OnCreateComponent = InternalOnCreateComponent;
p_Main.AppendComponent(lb_Fields);
li_Fields = lb_Fields.List;
li_Fields.OnCreateComponent = ListCreateComponent;
li_Fields.bDrawSelectionBorder = False;
SetFileManager();
}
event Closed(GUIComponent Sender, bool bCancelled )
{
Super.Closed(Sender, bCancelled);
Stream.SaveID3Tag();
}
function bool SetFileManager()
{
if ( FileManager != None )
{
if ( Handler == None && !SetHandler() )
return false;
return true;
}
if ( Handler == None && !SetHandler() )
return false;
FileManager = Handler.FileManager;
return FileManager != None;
}
function bool SetHandler()
{
local int i;
if ( Controller == None || Controller.ViewportOwner == None )
return false;
for ( i = 0; i < Controller.ViewportOwner.LocalInteractions.Length; i++ )
{
if ( StreamInteraction(Controller.ViewportOwner.LocalInteractions[i]) != None )
{
Handler = StreamInteraction(Controller.ViewportOwner.LocalInteractions[i]);
return true;
}
}
log("StreamPlayer.SetHandler() - no StreamInteractions found!",'MusicPlayer');
return false;
}
function HandleObject( Object Obj, optional Object OptionalObject_1, optional Object OptionalObj_2 )
{
// REMOVE ME
Assert(FileName != "");
if ( Obj != None )
Stream = Stream(Obj);
if ( Stream == None )
Stream = FileManager.CreateStream(FileName);
if ( Stream != None )
ID3Tag = Stream.GetTag();
ReadTag();
}
function HandleParameters( string ParamA, string ParamB )
{
Filename = ParamA;
}
function InternalOnChange(GUIComponent Sender)
{
local int i, idx;
local GUIMenuOption mo;
// log(Name@"InternalOnChange Sender:"$Sender);
if ( GUIMultiOptionList(Sender) != None )
{
mo = li_Fields.Get();
if ( mo == None )
{
warn("mo was None"); // FIXME
return;
}
idx = FindFieldIndex( mo.Caption );
if ( i != -1 )
ID3Tag.Fields[i].FieldValue = mo.GetComponentValue();
}
}
function int FindFieldIndex( string Caption )
{
local int i;
for ( i = 0; i < ID3Tag.Fields.Length; i++ )
{
if ( ID3Tag.Fields[i].FieldName == Caption )
return i;
}
return -1;
}
function ReadTag()
{
local int i;
local AnimatedEditBox box;
if ( ID3Tag == None )
return;
for ( i = 0; i < ID3Tag.Fields.Length; i++ )
{
box = AnimatedEditBox( li_Fields.AddItem("GUI2K4.AnimatedEditBox", None, ID3Tag.Fields[i].FieldName) );
box.SetComponentValue( ID3Tag.Fields[i].FieldValue, True );
}
}
/*
function InternalOnCreateComponent( GUIComponent NewComp, GUIComponent Sender )
{
if ( GUILabel(NewComp) != None )
{
NewComp.StyleName = "TextLabel";
NewComp.bScaleToParent=True;
NewComp.bBoundToParent=True;
NewComp.ScalingType=SCALE_X;
}
if ( AnimatedEditBox(NewComp) != None )
{
NewComp.OnChange = InternalOnChange;
AnimatedEditBox(NewComp).LabelStyleName = "TextLabel";
NewComp.Hint = EditBoxHint;
NewComp.bScaleToParent=True;
NewComp.bBoundToParent=True;
NewComp.ScalingType=SCALE_X;
}
}
*/
function SetPanelPosition(Canvas C)
{
local float AT;
AT = t_WindowTitle.ActualTop() + t_WindowTitle.ActualHeight() + 2;
p_Main.WinTop = p_Main.RelativeTop( AT );
p_Main.WinHeight = p_Main.RelativeHeight( (Bounds[3] - ActualHeight(0.015)) - AT );
}
function ListCreateComponent(GUIMenuOption NewComp, GUIMultiOptionList Sender)
{
NewComp.bAutoSizeCaption = False;
}
DefaultProperties
{
MinPageWidth=0.458984
MinPageHeight=0.330155
EditBoxHint="Click to edit"
WindowName="Tag Editor"
Begin Object Class=GUIPanel Name=MainPanel
WinWidth=0.978750
WinHeight=0.896250
WinLeft=0.011250
WinTop=0.091595
RenderWeight=0.2
End Object
p_Main=MainPanel
Begin Object Class=GUIMultiOptionListBox Name=FieldList
WinWidth=1.0
WinHeight=1.0
WinLeft=0.0
WinTop=0.0
bScaleToParent=True
bBoundToParent=True
bVisibleWhenEmpty=True
NumColumns=1
End Object
lb_Fields=FieldList
}

View file

@ -0,0 +1,50 @@
//==============================================================================
// Each InstantActionRulesPanel handles PlayInfo settings for a single PlayInfo group.
//
// Created by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class InstantActionRulesPanel extends UT2K4PlayInfoPanel;
var UT2K4GameTabBase tp_Anchor;
var UT2K4GamePageBase p_Anchor;
function ClearRules()
{
local int i, j;
for (i = 0; i < li_Rules.Elements.Length; i++)
{
for (j = 0; j < InfoRules.Length; j++)
if (InfoRules[j].DisplayName == li_Rules.Elements[i].Caption)
break;
if (j == InfoRules.Length)
li_Rules.RemoveItem(i--);
}
}
function LoadRules()
{
local int i;
//log(Name@"LoadRules()");
for (i = 0; i < InfoRules.Length; i++)
AddRule(InfoRules[i], i);
Super.LoadRules();
}
DefaultProperties
{
Begin Object Class=GUIMultiOptionListBox Name=RuleListBox
OnChange=InternalOnChange
bBoundToParent=True
bScaleToParent=True
WinWidth=1.0
WinLeft=0.0
WinHeight=1.0
WinTop=0.0
TabOrder=0
End Object
lb_Rules=RuleListBox
}

View file

@ -0,0 +1,614 @@
//==============================================================================
// Created on: 11/23/2003
// Base class for menus that allow configuration of keybinds
//
// Written by Ron Prestenback
// <20> 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class KeyBindMenu extends LockedFloatingWindow;
struct InputKeyInfo
{
var int KeyNumber;
var string KeyName;
var string LocalizedKeyName;
};
struct KeyBinding
{
var bool bIsSectionLabel;
var string KeyLabel;
var string Alias;
var array<int> BoundKeys;
};
var() noexport editconst InputKeyInfo AllKeys[255];
var() array<KeyBinding> Bindings;
var() bool bPendingRawInput; // Waiting for input - changing a keybind
var() editconst noexport int NewIndex, NewSubIndex;
var() editconst noexport GUIStyles SelStyle, SectionStyle;
var() string SectionStyleName;
var automated GUIMultiColumnListBox lb_Binds;
var automated GUIMultiColumnList li_Binds;
var automated GUIImage i_Bk;
var automated GUILabel l_Hint;
var() localized string Headings[3];
var() float SectionLabelMargin;
var() localized string PageCaption;
var() localized string SpeechLabel;
var() localized string CloseCaption, ResetCaption, ClearCaption, ActionText;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.InitComponent(MyController, MyOwner);
t_WindowTitle.SetCaption(PageCaption);
li_Binds = lb_Binds.List;
SectionStyle = Controller.GetStyle(SectionStyleName, li_Binds.FontScale);
InitializeBindingsArray();
Initialize();
b_OK.Caption = CloseCaption;
b_Cancel.Caption = ResetCaption;
}
function InitializeBindingsArray()
{
local int i;
for ( i = 0; i < ArrayCount(AllKeys); i++ )
{
AllKeys[i].KeyNumber = i;
Controller.KeyNameFromIndex( byte(i), AllKeys[i].KeyName, AllKeys[i].LocalizedKeyName );
}
}
function Initialize()
{
LoadCommands();
MapBindings();
}
// Add all possible commands to the guilist
function LoadCommands()
{
ClearBindings();
}
// query each key's assigned command/alias, and add the key number to the appropriate place
function MapBindings()
{
local int i, BindingIndex;
local string Alias;
for ( i = 1; i < ArrayCount(AllKeys); i++ )
{
// Find out if this key is currently bound to any commands
if ( Controller.GetCurrentBind( AllKeys[i].KeyName, Alias ) )
{
// If this key is bound to a command, find out if the command is a known alias
BindingIndex = FindAliasIndex( Alias );
if ( BindingIndex != -1 )
BindKeyToAlias( BindingIndex, i );
}
}
}
function CreateAliasMapping(string Command, string FriendlyName, bool bSectionLabel)
{
local int At;
At = Bindings.Length;
Bindings.Length = Bindings.Length + 1;
Bindings[At].bIsSectionLabel = bSectionLabel;
Bindings[At].KeyLabel = FriendlyName;
Bindings[At].Alias = Command;
li_Binds.AddedItem();
}
function BindKeyToAlias( int BindIndex, int KeyIndex )
{
local int i;
if ( !ValidBindIndex(BindIndex) )
return;
if ( !ValidKeyIndex(KeyIndex) )
return;
for ( i = 0; i < Bindings[BindIndex].BoundKeys.Length; i++ )
{
if ( Bindings[BindIndex].BoundKeys[i] == KeyIndex )
return;
if ( class'GameInfo'.static.GetBindWeight(Bindings[BindIndex].BoundKeys[i]) < class'GameInfo'.static.GetBindWeight(KeyIndex) )
break;
}
Bindings[BindIndex].BoundKeys.Insert( i, 1 );
Bindings[BindIndex].BoundKeys[i] = KeyIndex;
}
function ClearBindings()
{
Bindings.Remove(0,Bindings.Length);
li_Binds.Clear();
}
function SetKeyBind(int Index, int SubIndex, byte NewKey)
{
if ( !ValidBindIndex(Index) )
return;
if ( SubIndex < Bindings[Index].BoundKeys.Length && Bindings[Index].BoundKeys[SubIndex] == NewKey )
return;
RemoveAllOccurance(NewKey);
RemoveExistingKey(Index, SubIndex);
if ( Controller.SetKeyBind(AllKeys[NewKey].KeyName, Bindings[Index].Alias) )
BindKeyToAlias(Index,NewKey);
// Controller.SetKeyBind( AllKeys[NewKey].KeyName, Bindings[Index].Alias );
li_Binds.UpdatedItem(Index);
}
function bool BeginRawInput(GUIComponent Sender)
{
local int Index, SubIndex;
if ( MouseOnCol1() )
SubIndex = 0;
else if ( MouseOnCol2() )
SubIndex = 1;
else
return true;
Index = li_Binds.CurrentListId();
if ( ValidBindIndex(Index) && Bindings[Index].bIsSectionLabel )
return true;
bPendingRawInput = true;
UpdateHint(Index);
NewIndex = Index;
NewSubIndex = SubIndex;
Controller.OnNeedRawKeyPress = RawKey;
Controller.Master.bRequireRawJoystick = true;
PlayerOwner().ClientPlaySound(Controller.EditSound);
PlayerOwner().ConsoleCommand("toggleime 0");
return true;
}
function bool RawKey(byte NewKey)
{
SetKeyBind( NewIndex, NewSubIndex, NewKey );
NewSubIndex = -1;
UpdateHint(NewIndex);
NewIndex = -1;
bPendingRawInput = false;
Controller.OnNeedRawKeyPress = none;
Controller.Master.bRequireRawJoystick = false;
PlayerOwner().ClientPlaySound(Controller.ClickSound);
return true;
}
function string GetCurrentKeyBind(int BindIndex, int SubIndex)
{
if ( !ValidBindIndex(BindIndex) )
return "";
if (Bindings[BindIndex].bIsSectionLabel)
return "";
if (BindIndex == NewIndex && SubIndex == NewSubIndex)
return "???";
if (SubIndex >= Bindings[BindIndex].BoundKeys.Length)
return "";
return AllKeys[Bindings[BindIndex].BoundKeys[SubIndex]].LocalizedKeyName;
}
function string ListGetSortString( int Index )
{
switch ( li_Binds.SortColumn )
{
case 0: return Bindings[Index].KeyLabel;
case 1: return GetCurrentKeyBind(Index,0);
case 2: return GetCurrentKeyBind(Index,1);
}
return "";
}
function bool ListOnKeyEvent(out byte Key, out byte State, float delta)
{
local Interactions.EInputKey iKey;
if ( State != 3 )
return li_Binds.InternalOnKeyEvent(Key,State,Delta);
iKey = EInputKey(Key);
if ( iKey == IK_Backspace ) // Backspace
{
// Clear Over
if ( MouseOnCol1() )
RemoveExistingKey(li_Binds.CurrentListId(),0);
else if ( MouseOnCol2() )
RemoveExistingKey(li_Binds.CurrentListId(),1);
return true;
}
if ( iKey == IK_Enter )
{
BeginRawInput(None);
return true;
}
return li_Binds.InternalOnKeyEvent(Key,State,Delta);
}
function ListTrack(GUIComponent Sender, int LastIndex)
{
local int Index, OldIndex;
if ( LastIndex >= 0 && LastIndex < li_Binds.ItemCount )
{
OldIndex = li_Binds.SortData[LastIndex].SortItem;
Index = li_Binds.CurrentListId();
if ( ValidBindIndex(Index) && Bindings[Index].bIsSectionLabel )
SearchDown(OldIndex);
if ( !bPendingRawInput )
UpdateHint(Index);
}
}
function SearchUp(int OldIndex)
{
local int cindex;
cindex = li_Binds.CurrentListId();
while ( cindex > 0 && cindex < Bindings.length)
{
if ( !Bindings[cindex].bIsSectionLabel )
{
li_Binds.SetIndex(cIndex);
return;
}
cindex--;
}
li_Binds.SetIndex(OldIndex);
}
function SearchDown(int OldIndex)
{
local int cindex;
cindex = li_Binds.CurrentListId();
while ( cindex > 0 && cindex < Bindings.Length )
{
if (!Bindings[cindex].bIsSectionLabel)
{
li_Binds.SetIndex(cIndex);
return;
}
cindex++;
}
li_Binds.SetIndex(OldIndex);
}
function RemoveExistingKey(int Index, int SubIndex)
{
local int KeyIndex;
if ( !ValidBindIndex(Index) )
return;
if ( SubIndex >= Bindings[Index].BoundKeys.Length || Bindings[Index].BoundKeys[SubIndex] < 0 )
return;
KeyIndex = Bindings[Index].BoundKeys[SubIndex];
Bindings[Index].BoundKeys.Remove(SubIndex, 1);
Controller.SetKeyBind( AllKeys[KeyIndex].KeyName, "" );
}
function RemoveAllOccurance(byte NewKey)
{
local int i,j;
for ( i = 0; i < Bindings.Length; i++ )
{
for ( j = 0; j < Bindings[i].BoundKeys.Length; j++ )
{
if ( Bindings[i].BoundKeys[j] == NewKey )
{
RemoveExistingKey(i,j);
break;
}
}
}
}
function UpdateHint(int BindIndex)
{
local int i;
local string Str, CurrentBindName;
if ( !ValidBindIndex(BindIndex) || Bindings[BindIndex].bIsSectionLabel )
{
l_Hint.Caption = "";
return;
}
if ( Bindings[BindIndex].BoundKeys.Length > 0 )
{
if ( bPendingRawInput )
{
DrawCurrentBind:
for ( i = 0; i < Bindings[BindIndex].BoundKeys.Length; i++ )
{
if ( Str != "" )
Str $= ",";
Str $= GetCurrentKeyBind(BindIndex, i);
}
if ( Str == "" )
l_Hint.Caption = "";
else l_Hint.Caption = Repl(ActionText, "%keybinds%", Str);
return;
}
else
{
if ( MouseOnCol2() ) i = 1;
CurrentBindName = GetCurrentKeyBind(BindIndex,i);
if ( CurrentBindName == "" )
goto DrawCurrentBind;
Str = Repl(Repl(ClearCaption,"%backspace%",AllKeys[8].LocalizedKeyName),
"%keybind%",CurrentBindName);
l_Hint.Caption = Repl( Str, "%keyname%", Bindings[BindIndex].KeyLabel );;
}
}
else l_Hint.Caption = "";
}
function bool MouseOnCol1()
{
local float CellLeft, CellWidth;
li_Binds.GetCellLeftWidth(1, CellLeft, CellWidth);
return Controller.MouseX >= CellLeft && Controller.MouseX <= CellLeft + CellWidth;
}
function bool MouseOnCol2()
{
local float CellLeft, CellWidth;
li_Binds.GetCellLeftWidth(2, CellLeft, CellWidth);
return Controller.MouseX >= CellLeft && Controller.MouseX <= CellLeft + CellWidth;
}
function bool ValidBindIndex(int Index)
{
return Index >= 0 && Index < Bindings.Length;
}
function bool ValidKeyIndex(int Index)
{
return Index >= 0 && Index < ArrayCount(AllKeys);
}
function int FindAliasIndex( string Alias )
{
local int i;
for ( i = 0; i < Bindings.Length; i++ )
if ( Bindings[i].Alias ~= Alias )
return i;
return -1;
}
function InternalOnCreateComponent( GUIComponent NewComp, GUIComponent Sender )
{
local GUIMultiColumnList L;
local int i;
if ( GUIMultiColumnListBox(Sender) != None )
{
L = GUIMultiColumnList(NewComp);
if ( L != None )
{
for ( i = 0; i < ArrayCount(Headings); i++ )
L.ColumnHeadings[i] = Headings[i];
L.OnKeyEvent = ListOnKeyEvent;
L.OnDrawItem = DrawBinding;
L.GetSortString = ListGetSortString;
L.ExpandLastColumn = True;
L.SortColumn = -1;
L.bHotTrack = True;
L.OnClick = BeginRawInput;
L.OnTrack = ListTrack;
}
GUIMultiColumnListBox(Sender).InternalOnCreateComponent(NewComp,Sender);
}
Super.InternalOnCreateComponent(NewComp,Sender);
}
function DrawBinding(Canvas Canvas, int Item, float X, float Y, float W, float H, bool bSelected, bool bPending)
{
local float CellLeft, CellWidth;
local GUIStyles DStyle;
// hack to fix selected item appearing offset
// real fix would be to create a "NoBackground" style that has the same border offsets as STY2ListSelection
local int i;
local int SavedOffset[4];
Canvas.Style = 1;
Item = li_Binds.SortData[Item].SortItem;
if ( !ValidBindIndex(Item) )
return;
if ( Bindings[Item].bIsSectionLabel )
{
li_Binds.GetCellLeftWidth( 0, CellLeft, CellWidth );
Canvas.SetPos( CellLeft + 3, Y );
Canvas.DrawColor = SectionStyle.ImgColors[li_Binds.MenuState];
Canvas.DrawTile(Controller.DefaultPens[0], W - 6, H, 0, 0, 32, 32);
SectionStyle.DrawText(Canvas, li_Binds.MenuState, CellLeft + SectionLabelMargin, Y, CellWidth, H, TXTA_Left, Bindings[Item].KeyLabel, li_Binds.FontScale);
return;
}
if ( bPendingRawInput )
bSelected = Item - li_Binds.Top == NewIndex;
if ( bSelected )
DStyle = li_Binds.SelectedStyle;
else DStyle = li_Binds.Style;
for ( i = 0; i < 4; i++ )
{
SavedOffset[i] = DStyle.BorderOffsets[i];
DStyle.BorderOffsets[i] = class'STY2ListSelection'.default.BorderOffsets[i];
}
if ( bSelected && !bPendingRawInput )
DStyle.Draw( Canvas, li_Binds.MenuState, X + DStyle.BorderOffsets[0], Y, W - DStyle.BorderOffsets[2], H );
li_Binds.GetCellLeftWidth(0, CellLeft, CellWidth);
DStyle.DrawText( Canvas, li_Binds.MenuState, CellLeft, Y, CellWidth - DStyle.BorderOffsets[2], H, TXTA_Center, Bindings[Item].KeyLabel, li_Binds.FontScale);
li_Binds.GetCellLeftWidth(1, CellLeft, CellWidth);
if ( bPendingRawInput && bSelected && NewSubIndex == 0 )
DStyle.Draw( Canvas, li_Binds.MenuState, CellLeft, Y, CellWidth - DStyle.BorderOffsets[2], H );
DStyle.DrawText(Canvas, li_Binds.MenuState, CellLeft, Y, CellWidth - DStyle.BorderOffsets[2], H, TXTA_Center, GetCurrentKeyBind(Item, 0), li_Binds.FontScale);
li_Binds.GetCellLeftWidth(2, CellLeft, CellWidth);
if ( bPendingRawInput && bSelected && NewSubIndex == 1 )
DStyle.Draw(Canvas, li_Binds.MenuState, CellLeft, Y, CellWidth - DStyle.BorderOffsets[2], H);
DStyle.DrawText(Canvas, li_Binds.MenuState, CellLeft, Y, CellWidth - DStyle.BorderOffsets[2], H, TXTA_Center, GetCurrentKeyBind(Item, 1), li_Binds.FontScale);
for ( i = 0; i < 4; i++ )
DStyle.BorderOffsets[i] = SavedOffset[i];
}
function bool InternalOnClick(GUIComponent Sender)
{
if ( Sender == b_OK )
{
Controller.CloseMenu(false);
return true;
}
else if ( Sender == b_Cancel )
{
Controller.ResetKeyboard();
Initialize();
}
}
function OnFadeIn()
{
Initialize();
}
defaultproperties
{
Headings(1)="Key 1"
Headings(2)="Key 2"
SectionLabelMargin=10
SectionStyleName="ListSection"
ClearCaption="Press '%backspace%' to unbind %keybind% from %keyname%."
CloseCaption="CLOSE"
ResetCaption="RESET"
FadedIn=OnFadeIn
sb_Main=None
Begin Object class=GUIImage name=BindBk
WinWidth=0.937207
WinHeight=0.808281
WinLeft=0.031397
WinTop=0.057552
bBoundToParent=true
bScaleToParent=true
ImageStyle=ISTY_Stretched
//Texture'InterfaceArt_tex.Menu.changeme_texture' //Image=material'2K4Menus.Newcontrols.Display99'
End Object
i_BK=BindBK
Begin Object Class=GUIMultiColumnListBox Name=BindListBox
WinWidth=0.911572
WinHeight=0.705742
WinLeft=0.043604
WinTop=0.085586
bScaleToParent=True
bBoundToParent=True
OnCreateComponent=InternalOnCreateComponent
HeaderColumnPerc(0)=0.5
HeaderColumnPerc(1)=0.25
HeaderColumnPerc(2)=0.25
TabOrder=0
End Object
lb_Binds=BindListBox
Begin Object Class=GUILabel Name=HintLabel
TextAlign=TXTA_Center
bMultiline=True
VertAlign=TXTA_Center
FontScale=FNS_Small
StyleName="textLabel"
WinTop=0.872222
WinLeft=0.032813
WinWidth=0.520313
WinHeight=0.085000
bBoundToParent=True
bScaleToParent=True
End Object
l_Hint=HintLabel
WinWidth=0.8
WinLeft=0.1
WinTop=0.05
WinHeight=0.9
DefaultLeft=0.1
DefaultTop=0.05
DefaultWidth=0.8
DefaultHeight=0.9
ActionText="{%keybinds%} - currently bound to this key."
}

View file

@ -0,0 +1,25 @@
//==============================================================================
// Created on: 10/10/2003
// Base class for larger non-full screen menus
// Background images are sized according to the size of the page.
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class LargeWindow extends FloatingWindow;
defaultproperties
{
OnCreateComponent=None
bResizeWidthAllowed=false
bResizeHeightAllowed=false
bMoveAllowed=false
bRequire640x480=True
PropagateVisibility=false
bCaptureInput=True
WinLeft=0.2
WinTop=0.2
WinHeight=0.6
WinWidth=0.6
InactiveFadeColor=(R=60,G=60,B=60,A=255)
}

View file

@ -0,0 +1,130 @@
//==============================================================================
// Created on: 12/29/2003
// This implementation of floating window has an internal frame, and is intended for
// menus which contain one or two large components (like lists)
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class LockedFloatingWindow extends FloatingWindow;
var automated GUISectionBackground sb_Main;
var automated GUIButton b_Cancel, b_OK;
var() localized string SubCaption; // this is the caption that will go onto the sectionbackground header
var() float EdgeBorder[4];
function InitComponent(GUIController InController, GUIComponent InOwner)
{
Super.InitComponent(InController, InOwner);
if ( SubCaption != "" )
sb_Main.Caption = SubCaption;
AlignButtons();
}
function InternalOnCreateComponent(GUIComponent NewComp, GUIComponent Sender)
{
if ( Sender == Self )
NewComp.bBoundToParent = True;
else Super.InternalOnCreateComponent(NewComp, Sender);
}
function bool InternalOnClick(GUIComponent Sender)
{
if ( Sender == b_OK )
{
Controller.CloseMenu(false);
return true;
}
if ( Sender == b_Cancel )
{
Controller.CloseMenu(true);
return true;
}
return false;
}
function AlignButtons()
{
local float X,Y,Xs,Ys;
local float WIP,HIP;
WIP = ActualWidth();
HIP = ActualHeight();
Xs = b_Ok.ActualWidth() * 0.1;
Ys = b_Ok.ActualHeight() * 0.1;
X = 1 - ( (b_Ok.ActualWidth() + Xs) / WIP) - (EdgeBorder[2] / WIP);
Y = 1 - ( (b_Ok.ActualHeight() + Ys) / HIP) - (EdgeBorder[3] / WIP);
b_Ok.WinLeft = X;
b_Ok.WinTop = Y;
X = 1 -( (b_Ok.ActualWidth() + b_Cancel.ActualWidth() + Xs) / WIP) - (EdgeBorder[2] / WIP);
b_Cancel.WinLeft = X;
b_Cancel.WinTop = Y;
}
defaultproperties
{
InactiveFadeColor=(R=60,G=60,B=60,A=255)
bResizeWidthAllowed=False
bResizeHeightAllowed=False
bAllowedAsLast=false
bCaptureInput=True
DefaultLeft=0.125
DefaultTop=0.15
DefaultWidth=0.74
DefaultHeight=0.7
WinLeft=0.125
WinTop=0.15
WinWidth=0.74
WinHeight=0.7
Begin Object class=AltSectionBackground name=InternalFrameImage
WinWidth=0.675859
WinHeight=0.550976
WinLeft=0.040000
WinTop=0.075000
End Object
sb_Main=InternalFrameImage
Begin Object Class=GUIButton Name=LockedCancelButton
bBoundToParent=true
WinWidth=0.159649
WinLeft=0.512695
WinTop=0.872397
Caption="Cancel"
TabOrder=99
OnClick=InternalOnClick
bAutoShrink=False
End Object
b_Cancel=LockedCancelButton
Begin Object Class=GUIButton Name=LockedOKButton
bBoundToParent=true
WinWidth=0.159649
WinLeft=0.742188
WinTop=0.872397
Caption="OK"
OnClick=InternalOnClick
TabOrder=100
bAutoShrink=False
End Object
b_OK=LockedOKButton
EdgeBorder(0)=16
EdgeBorder(1)=24
EdgeBorder(2)=16
EdgeBorder(3)=24
}

View file

@ -0,0 +1,52 @@
//==============================================================================
// Created on: 11/17/2003
// Description
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class MOTDConfigPage extends GUIArrayPropPage;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.InitComponent(MyController, MyOwner);
sb_Bk1.WinWidth = 0.621875;
sb_Bk1.WinHeight = 0.340625;
sb_Bk1.WinLeft = 0.043750;
sb_Bk1.WinTop = 0.116666;
sb_Bk1.TopPadding = 0.01;
sb_Bk1.LeftPadding = 0.01;
sb_Bk1.RightPadding = 0.01;
}
function SetOwner(GUIComponent NewOwner)
{
Super.SetOwner(NewOwner);
PropValue.Length = 4;
}
function string GetDataString()
{
return JoinArray(PropValue, "|", True);
}
function SetItemOptions( GUIMenuOption mo )
{
local moEditBox ed;
ed = moEditBox(mo);
if ( ed != None )
ed.MyEditBox.MaxWidth = 60;
}
DefaultProperties
{
WinWidth=0.684570
WinHeight=0.509375
WinLeft=0.166992
WinTop=0.218750
Delim="|"
}

View file

@ -0,0 +1,55 @@
//==============================================================================
// Container for maplists
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class MapListBox extends GUIListBox;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.InitComponent(MyController, MyOwner);
// TODO Assiging delegate in default properties here causes crash, for some reason
ContextMenu.OnOpen = MyOpen;
ContextMenu.OnClose = MyClose;
ContextMenu.OnSelect = ContextClick;
}
function ContextClick(GUIContextMenu Sender, int Index)
{
NotifyContextSelect(Sender, Index);
}
function bool MyRealOpen(GUIComponent MenuOwner)
{
return false;
}
function bool MyOpen(GUIContextMenu Menu)
{
return HandleContextMenuOpen(List, Menu, Menu.MenuOwner);
}
function bool MyClose(GUIContextMenu Sender)
{
return HandleContextMenuClose(Sender);
}
DefaultProperties
{
Begin Object Class=GUIContextMenu Name=RCMenu
ContextItems(0)="Play This Map"
ContextItems(1)="Spectate This Map"
ContextItems(2)="-"
ContextItems(3)="Add To Maplist"
ContextItems(4)="Remove From Maplist"
ContextItems(5)="Filter Maplist"
// OnClick=RightClick
// OnOpen=MyOpen
// OnClose=MyClose
StyleName="ServerListContextMenu"
End Object
ContextMenu=RCMenu
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,40 @@
//==============================================================================
// Created on: 10/10/2003
// Base class for simple popups
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class MessageWindow extends PopupPageBase;
DefaultProperties
{
Begin Object Class=FloatingImage Name=MessageWindowFrameBackground
// WinWidth=1.000000
// WinHeight=0.289063
// WinLeft=0.000000
// WinTop=0.335938
WinWidth=1
WinHeight=1
WinLeft=0
WinTop=0
// if _RO_
// easier to fix here than changing everywhere --emh
// Image=Texture'InterfaceArt_tex.Menu.Quitmenu'
// ImageStyle=ISTY_Scaled
// else
Image=Texture'KF_InterfaceArt_tex.Menu.Med_border_SlightTransparent'
// end if _RO_
bBoundToParent=true
bScaleToParent=true
DropShadowX=0
DropShadowY=0
End Object
i_FrameBG=MessageWindowFrameBackground
WinLeft=0.0
WinHeight=0.38
WinTop=0.3
WinWidth=1.0
}

View file

@ -0,0 +1,46 @@
//==============================================================================
// Created on: 11/12/2003
// Base class for mid-game menu tabs
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class MidGamePanel extends UT2K4TabPanel
abstract;
var() bool bLocked;
delegate ModifiedChatRestriction( MidGamePanel Sender, int PlayerID );
function UpdateChatRestriction( int PlayerID )
{
log(Name@"UpdateChatRestriction PlayerID:"$PlayerID,'ChatManager');
}
function bool PlayerIDIsMine( coerce int idx )
{
local PlayerController PC;
PC = PlayerOwner();
if ( PC != None && PC.PlayerReplicationInfo != None && PC.PlayerReplicationInfo.PlayerID == idx )
return true;
return false;
}
function Free()
{
bLocked = true;
Super.Free();
}
function LevelChanged()
{
bLocked = true;
Super.LevelChanged();
}
DefaultProperties
{
}

View file

@ -0,0 +1,25 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class ModsAndDemosTabs extends UT2K4TabPanel
abstract;
var UT2K4ModsAndDemos MyPage;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
super.InitComponent(MyController,MyOwner);
MyPage = UT2K4ModsAndDemos(MyOwner.MenuOwner);
}
function ShowPanel(bool bShow)
{
if (bShow)
MyPage.MyFooter.TabChange(Tag);
super.ShowPanel(bShow);
}

View file

@ -0,0 +1,426 @@
//==============================================================================
// This page displays all configurable properties for mutators.
// Alot of functionality copied from IAMultiColumnRulesPanel
//
// Written by Ron Prestenback
// <09> 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class MutatorConfigMenu extends LockedFloatingWindow;
var PlayInfo MutInfo;
var array<string> ActiveMuts;
var localized string CustomConfigText, ConfigButtonText, EditButtonText, NoPropsMessage;
var automated GUIMultiOptionListBox lb_Config;
var GUIMultiOptionList li_Config;
var automated moCheckBox ch_Advanced;
var bool bIsMultiplayer; //are we setting up mutators for a multiplayer game?
function InitComponent(GUIController MyController, GUIComponent MyComponent)
{
Super.InitComponent(MyController, MyComponent);
sb_Main.LeftPadding = 0.01;
sb_Main.RightPadding = 0.01;
sb_Main.ManageComponent(lb_Config);
MutInfo = new(None) class'PlayInfo';
li_Config = lb_Config.List;
li_Config.OnCreateComponent=ListOnCreateComponent;
li_Config.bHotTrack = True;
ch_Advanced.Checked(MyController.bExpertMode);
}
function Initialized()
{
if ( bInit )
return;
// if we didn't add any items to the list, display the no configurable properties message in the header
if (li_Config.Elements.Length == 0)
{
sb_Main.Caption = NoPropsMessage;
RemoveComponent(lb_Config);
}
}
function Initialize()
{
local array<class<Mutator> > MutClasses;
local int i, j;
local bool bTemp, bFoundMutatorSettings;
local GUIMenuOption NewComp;
li_Config.Clear();
bTemp = Controller.bCurMenuInitialized;
Controller.bCurMenuInitialized = False;
MutClasses = class'xUtil'.static.GetMutatorClasses(ActiveMuts);
MutInfo.Init( MutClasses );
for (i = 0; i < MutClasses.Length; i++)
{
// If this class has a mutator config menu, just show the custom config button
if (MutClasses[i].default.ConfigMenuClassName != "")
{
AddMutatorHeader(MutClasses[i].default.FriendlyName, i == 0);
NewComp = li_Config.AddItem( "XInterface.moButton", , CustomConfigText );
if (NewComp == None) break;
NewComp.bAutoSizeCaption = True;
NewComp.ComponentWidth = 0.25;
NewComp.OnChange = OpenCustomConfigMenu;
moButton(NewComp).MyButton.Caption = ConfigButtonText;
moButton(NewComp).Value = MutClasses[i].default.ConfigMenuClassName;
}
// Otherwise, add all of this mutator's playinfo setting to the list.
// If the mutator doesn't have any, add the no settings message
else
{
if ( !MutatorHasProps(MutClasses[i]) )
continue;
AddMutatorHeader(MutClasses[i].default.FriendlyName, i == 0);
bFoundMutatorSettings = false;
for (j = 0; j < MutInfo.Settings.Length; j++)
{
if (MutInfo.Settings[j].ClassFrom == MutClasses[i] || (bFoundMutatorSettings && class<Mutator>(MutInfo.Settings[j].ClassFrom) == None))
{
bFoundMutatorSettings = true;
if ((Controller.bExpertMode || !MutInfo.Settings[j].bAdvanced) && (bIsMultiplayer || !MutInfo.Settings[j].bMPOnly))
{
NewComp = AddRule(MutInfo.Settings[j]);
if (NewComp != None)
{
NewComp.Tag = j;
NewComp.LabelJustification = TXTA_Left;
NewComp.ComponentJustification = TXTA_Right;
NewComp.bAutoSizeCaption = True;
NewComp.SetComponentValue(MutInfo.Settings[j].Value);
// NewComp.OnChange = InternalOnChange;
}
else
Warn("Error adding new component to multi-options list:"$MutInfo.Settings[j].SettingName);
}
}
else
bFoundMutatorSettings = false;
}
// No settings found for this mutator
if (GUIListSpacer(li_Config.Elements[li_Config.Elements.Length - 1]) != None)
li_Config.AddItem("XInterface.GUIListSpacer",,NoPropsMessage);
}
}
bInit = false;
Initialized();
Controller.bCurMenuInitialized = bTemp;
}
function AddMutatorHeader(string MutatorName, bool InitialRow)
{
local int ModResult, i;
// If the GUIMultiOptionList has more than one column, add a spacer component
// for each column until we are back to the first column
ModResult = li_Config.Elements.Length % lb_Config.NumColumns;
while (ModResult-- > 0)
li_Config.AddItem( "XInterface.GUIListSpacer" );
if (!InitialRow)
for (i = 0; i < lb_Config.NumColumns; i++)
li_Config.AddItem( "XInterface.GUIListSpacer" );
i = 0;
// We are now at the first column - safe to add a header row
li_Config.AddItem( "XInterface.GUIListHeader",, MutatorName );
while (++i < lb_Config.NumColumns)
li_Config.AddItem( "XInterface.GUIListHeader" );
}
function GUIMenuOption AddRule(PlayInfo.PlayInfoData NewRule)
{
local bool bTemp;
local string Width, Op;
local array<string> Range;
local GUIMenuOption NewComp;
local int i, pos;
bTemp = Controller.bCurMenuInitialized;
Controller.bCurMenuInitialized = False;
switch (NewRule.RenderType)
{
case PIT_Check:
NewComp = li_Config.AddItem("XInterface.moCheckbox",,NewRule.DisplayName);
if (NewComp == None)
break;
NewComp.bAutoSizeCaption = True;
break;
case PIT_Select:
NewComp = li_Config.AddItem("XInterface.moComboBox",,NewRule.DisplayName);
if (NewComp == None)
break;
moCombobox(NewComp).ReadOnly(True);
NewComp.bAutoSizeCaption = True;
Split(NewRule.Data, ";", Range);
for (i = 0; i+1 < Range.Length; i += 2)
moComboBox(NewComp).AddItem(Range[i+1],,Range[i]);
break;
case PIT_Text:
if ( !Divide(NewRule.Data, ";", Width, Op) )
Width = NewRule.Data;
pos = InStr(Width, ",");
if (pos != -1)
Width = Left(Width, pos);
if (Width != "")
i = int(Width);
else i = -1;
Split(Op, ":", Range);
if (Range.Length > 1)
{
// Ranged data
if (InStr(Range[0], ".") != -1)
{
// float edit
NewComp = li_Config.AddItem("XInterface.moFloatEdit",,NewRule.DisplayName);
if (NewComp == None) break;
NewComp.bAutoSizeCaption = True;
NewComp.ComponentWidth = 0.25;
if (i != -1)
moFloatEdit(NewComp).Setup( float(Range[0]), float(Range[1]), moFloatEdit(NewComp).MyNumericEdit.Step );
}
else
{
NewComp = li_Config.AddItem("XInterface.moNumericEdit",,NewRule.DisplayName);
if (NewComp == None) break;
moNumericEdit(NewComp).bAutoSizeCaption = True;
NewComp.ComponentWidth = 0.25;
if (i != -1)
moNumericEdit(NewComp).Setup( int(Range[0]), int(Range[1]), moNumericEdit(NewComp).MyNumericEdit.Step);
}
}
else if (NewRule.ArrayDim != -1)
{
NewComp = li_Config.AddItem("XInterface.moButton",,NewRule.DisplayName);
if (NewComp == None) break;
NewComp.bAutoSizeCaption = True;
NewComp.ComponentWidth = 0.25;
NewComp.OnChange = ArrayPropClicked;
}
else
{
NewComp = li_Config.AddItem("XInterface.moEditBox",,NewRule.DisplayName);
if (NewComp == None) break;
NewComp.bAutoSizeCaption = True;
if (i != -1)
moEditbox(NewComp).MyEditBox.MaxWidth = i;
}
break;
}
NewComp.SetHint(NewRule.Description);
Controller.bCurMenuInitialized = bTemp;
return NewComp;
}
function ArrayPropClicked(GUIComponent Sender)
{
local int i;
local GUIArrayPropPage ArrayPage;
local string ArrayMenu;
i = Sender.Tag;
if (i < 0)
return;
if (MutInfo.Settings[i].ArrayDim > 1)
ArrayMenu = Controller.ArrayPropertyMenu;
else
ArrayMenu = Controller.DynArrayPropertyMenu;
if (Controller.OpenMenu(ArrayMenu, MutInfo.Settings[i].DisplayName, MutInfo.Settings[i].Value))
{
ArrayPage = GUIArrayPropPage(Controller.ActivePage);
ArrayPage.Item = MutInfo.Settings[i];
ArrayPage.OnClose = ArrayPageClosed;
ArrayPage.SetOwner(Sender);
}
}
function ArrayPageClosed(optional bool bCancelled)
{
local GUIArrayPropPage ArrayPage;
local GUIComponent CompOwner;
if (!bCancelled)
{
ArrayPage = GUIArrayPropPage(Controller.ActivePage);
if (ArrayPage != None)
{
CompOwner = ArrayPage.GetOwner();
if (moButton(CompOwner) != None)
{
moButton(CompOwner).SetComponentValue(ArrayPage.GetDataString(), true);
InternalOnChange(CompOwner);
}
}
}
}
function InternalOnChange(GUIComponent Sender)
{
local int i;
local GUIMenuOption mo;
if (Sender == ch_Advanced)
{
Controller.bExpertMode = ch_Advanced.IsChecked();
Controller.SaveConfig();
Initialize();
}
else if (GUIMultiOptionList(Sender) != None)
{
mo = GUIMultiOptionList(Sender).Get();
i = mo.Tag;
if (i >= 0 && i < MutInfo.Settings.Length)
MutInfo.StoreSetting(i, mo.GetComponentValue());
}
else if ( GUIMenuOption(Sender) != None )
{
i = Sender.Tag;
if ( i >= 0 && i < MutInfo.Settings.Length )
MutInfo.StoreSetting(i, GUIMenuOption(Sender).GetComponentValue());
}
}
function OpenCustomConfigMenu(GUIComponent Sender)
{
if (moButton(Sender) != None)
Controller.OpenMenu(moButton(Sender).Value);
}
function ListOnCreateComponent(GUIMenuOption NewComp, GUIMultiOptionList Sender)
{
if (moButton(NewComp) != None)
{
moButton(NewComp).ButtonStyleName = "SquareButton";
moButton(NewComp).ButtonCaption = EditButtonText;
}
NewComp.LabelJustification = TXTA_Left;
NewComp.ComponentJustification = TXTA_Right;
}
function InternalOnCreateComponent(GUIComponent NewComp, GUIComponent Sender)
{
if (GUIMultiOptionList(NewComp) != None)
{
GUIMultiOptionList(NewComp).bDrawSelectionBorder = False;
GUIMultiOptionList(NewComp).ItemPadding = 0.15;
if (Sender == lb_Config)
lb_Config.InternalOnCreateComponent(NewComp, Sender);
}
Super.InternalOnCreateComponent(NewComp,Sender);
}
function bool MutatorHasProps( class<Mutator> MutatorClass )
{
local int i;
if ( MutInfo == None )
return false;
for ( i = 0; i < MutInfo.Settings.Length; i++ )
if ( MutInfo.Settings[i].ClassFrom == MutatorClass )
return true;
return false;
}
function AlignButtons()
{
Super.AlignButtons();
ch_Advanced.WinTop = b_OK.WinTop + 0.006511;
}
event Closed(GUIComponent Sender, bool bCancelled)
{
Super.Closed(Sender,bCancelled);
if ( !bCancelled )
MutInfo.SaveSettings();
}
DefaultProperties
{
WindowName="Custom Configuration Page"
SubCaption="Mutator Configuration"
ConfigButtonText="Open"
EditButtonText="Edit"
NoPropsMessage="No Configurable Properties"
bCaptureInput=True
bRequire640x480=False
bRenderWorld=True
Begin Object Class=GUIMultiOptionListBox Name=ConfigList
WinWidth=0.918753
WinHeight=0.697502
WinLeft=0.037500
WinTop=0.143333
bVisibleWhenEmpty=True
NumColumns=1
bBoundToParent=True
bScaleToParent=True
TabOrder=1
RenderWeight=0.9
OnCreateComponent=InternalOnCreateComponent
OnChange=InternalOnChange
StyleName="NoBackground"
End Object
lb_Config=ConfigList
Begin Object Class=moCheckBox Name=AdvancedButton
OnChange=InternalOnChange
Caption="View Advanced Options"
Hint="Toggles whether advanced properties are displayed"
WinWidth=0.310000
WinHeight=0.040000
WinLeft=0.0375000
WinTop=0.911982
//0.905471
TabOrder=1
RenderWeight=1.0
bSquare=True
bBoundToParent=True
bAutoSizeCaption=True
End Object
ch_Advanced=AdvancedButton
}

View file

@ -0,0 +1,37 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class MySubTestPanelA extends TestPanelBase;
var Automated GUIMultiColumnListBox MultiColumnListBoxTest;
defaultproperties
{
Begin Object class=GUIContextMenu Name=cTestMenu
ContextItems(0)="Test 0"
ContextItems(1)="Test 1"
ContextItems(2)="Fuck YOU"
ContextItems(3)="ABCDEFGHIJKLM"
ContextItems(4)="NOPQR"
End Object
Begin Object class=GUIMultiColumnListBox Name=cOne
WinWidth=1
WinHeight=1
WinLeft=0
WinTop=0
bVisibleWhenEmpty=true
DefaultListClass="GUI2K4.MyTestMultiColumnList"
ContextMenu=cTestMenu
End Object
MultiColumnListBoxTest=cOne
Background=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Backgrounds.bg11'
WinWidth=1.000000
WinHeight=0.807813
WinLeft=0.000000
WinTop=55.980499
}

View file

@ -0,0 +1,38 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class MySubTestPanelB extends TestPanelBase;
var Automated GUIListBox ListBoxTest;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
local int i,c;
Super.Initcomponent(MyController, MyOwner);
c = rand(75)+25;
for (i=0;i<c;i++)
ListBoxTest.List.Add("All Work & No Play Makes Me Sad");
}
defaultproperties
{
Begin Object class=GUIListBox Name=cOne
WinWidth=1
WinHeight=1
WinLeft=0
WinTop=0
bVisibleWhenEmpty=true
End Object
ListBoxTest=cOne
Background=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Backgrounds.bg11'
WinWidth=1.000000
WinHeight=0.807813
WinLeft=0.000000
WinTop=55.980499
}

View file

@ -0,0 +1,40 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class MyTest2Page extends TestPageBase;
var automated GUIImage i_Background;
var automated GUIEditbox ed_Test;
defaultproperties
{
WinTop=0.0
WinLeft=0.0
WinHeight=1.0
WinWidth=1.0
Begin Object Class=GUIEditbox Name=TestEdit
WinWidth=0.2
WinHeight=0.2
WinTop=0.2
WinLeft=0.2
End Object
ed_Test=TestEdit
Begin Object Class=GUIImage Name=PageBackground
Image=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.popupBorder_b'
WinTop=0.2
WinLeft=0.2
WinHeight=0.6
WinWidth=0.6
End Object
i_Background=PageBackground
Begin Object Class=GUIImage Name=PageFill
End Object
// ifndef _RO_
//Background=Material'2K4Menus.Controls.menuBackground2'
}

View file

@ -0,0 +1,83 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class MyTestMultiColumnList extends GUIMultiColumnList;
struct MyTestItem
{
var string Caption;
var int Value;
var string Key;
};
var() array<MyTestItem> MyData;
var GUIStyles SelStyle;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
local int i,j,c;
c = rand(50)+50;
for (i=0;i<c;i++)
{
j = MyData.Length;
MyData.Length = j+1;
MyData[j].Caption = "This is a test";
MyData[j].Value = rand(2000);
MyData[j].Key = "KEY"@i;
AddedItem();
}
// set delegates
OnDrawItem = MyOnDrawItem;
Super.Initcomponent(MyController, MyOwner);
SelStyle = Controller.GetStyle("SquareButton",FontScale);
}
function Clear()
{
MyData.Remove(0,MyData.Length);
ItemCount = 0;
Super.Clear();
}
function MyOnDrawItem(Canvas Canvas, int i, float X, float Y, float W, float H, bool bSelected, bool bPending)
{
local float CellLeft, CellWidth;
// Draw the selection border
if( bSelected )
SelStyle.Draw(Canvas,MSAT_Pressed, X, Y-2, W, H+2 );
GetCellLeftWidth( 0, CellLeft, CellWidth );
Style.DrawText( Canvas, MenuState, X+CellLeft, Y, CellWidth, H, TXTA_Left, MyData[SortData[i].SortItem].Caption, FontScale );
GetCellLeftWidth( 1, CellLeft, CellWidth );
Style.DrawText( Canvas, MenuState, X+CellLeft, Y, CellWidth, H, TXTA_Left, ""$MyData[SortData[i].SortItem].Value, FontScale );
GetCellLeftWidth( 2, CellLeft, CellWidth );
Style.DrawText( Canvas, MenuState, X+CellLeft, Y, CellWidth, H, TXTA_Left, MyData[SortData[i].SortItem].Key, FontScale );
}
function string GetSortString( int i )
{
return MyData[i].Caption;
}
defaultproperties
{
ColumnHeadings(0)="Caption"
ColumnHeadings(1)="Value"
ColumnHeadings(2)="Key"
InitColumnPerc(0)=0.5
InitColumnPerc(1)=0.25
InitColumnPerc(2)=0.25
SortColumn=0
SortDescending=False
}

View file

@ -0,0 +1,112 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class MyTestPage extends TestPageBase;
// if _RO_
// else
//#exec OBJ LOAD FILE=InterfaceContent.utx
// end if _RO_
var Automated GUIHeader TabHeader;
var Automated GUITabControl TabC;
var Automated GUITitleBar TabFooter;
var Automated GUIButton BackButton;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.Initcomponent(MyController, MyOwner);
TabHeader.DockedTabs = TabC;
TabC.AddTab("Component Test","GUI2K4.MyTestPanelA",,"Test of many non-list components");
TabC.AddTab("List Tests","GUI2K4.MyTestPanelB",,"Test of list components");
TabC.AddTab("Splitter","GUI2K4.MyTestPanelC",,"Test of the Splitter component");
}
function TabChange(GUIComponent Sender)
{
if (GUITabButton(Sender)==none)
return;
TabHeader.SetCaption("Testing : "$GUITabButton(Sender).Caption);
}
event ChangeHint(string NewHint)
{
TabFooter.SetCaption(NewHint);
}
function bool ButtonClicked(GUIComponent Sender)
{
local CacheManager.MapRecord Record;
Record = class'CacheManager'.static.getMapRecord("CTF-Maul");
return true;
}
event bool NotifyLevelChange()
{
Controller.CloseMenu(true);
return Super.NotifyLevelChange();
}
defaultproperties
{
Begin Object class=GUIHeader name=MyHeader
Caption="Settings"
StyleName="Header"
WinWidth=1.000000
WinHeight=36.000000
WinLeft=0.000000
WinTop=0.005414
Effect=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'CO_Final'
End Object
Begin Object Class=GUITabControl Name=MyTabs
WinWidth=1.0
WinLeft=0
WinTop=0.25
WinHeight=48
TabHeight=0.04
OnChange=TabChange;
bAcceptsInput=true
bDockPanels=true
End Object
Begin Object class=GUITitleBar name=MyFooter
WinWidth=0.880000
WinHeight=0.055000
WinLeft=0.120000
WinTop=0.942397
bUseTextHeight=false
StyleName="Footer"
Justification=TXTA_Center
End Object
Begin Object Class=GUIButton Name=MyBackButton
Caption="BACK"
StyleName="SquareMenuButton"
Hint="Return to Previous Menu"
WinWidth=0.12
WinHeight=0.055
WinLeft=0
WinTop=0.942397
OnClick=ButtonClicked
End Object
TabHeader=MyHeader
TabC=MyTabs
TabFooter=MyFooter
BackButton=MyBackButton
Background=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Backgrounds.bg11'
WinWidth=1.0
WinHeight=1.0
WinTop=0.0
WinLeft=0.0
}

View file

@ -0,0 +1,107 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class MyTestPanelA extends TestPanelBase;
var Automated moCheckBox CheckTest;
var Automated moEditBox EditTest;
var Automated moFloatEdit FloatTest;
var Automated moNumericEdit NumEditTest;
var Automated GUILabel lbSliderTest;
var Automated GUISlider SliderTest;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.InitComponent(MyController,MyOwner);
SliderTest.SetFriendlyLabel(lbSliderTest);
}
defaultproperties
{
Begin Object class=moCheckBox Name=cTwo
WinWidth=0.5
WinHeight=0.050000
WinLeft=0.25
WinTop=0.2
Caption="moCheckBox Test"
CaptionWidth=0.9
bSquare=true
ComponentJustification=TXTA_Left
TabOrder=1
Hint="This is a check Box"
End Object
Begin Object class=moEditBox Name=cThree
WinWidth=0.5
WinHeight=0.050000
WinLeft=0.25
WinTop=0.3
Caption="moEditBox Test"
CaptionWidth=0.4
TabOrder=2
Hint="This is an Edit Box"
End Object
Begin Object class=moNumericEdit Name=cFive
WinWidth=0.5
WinHeight=0.050000
WinLeft=0.25
WinTop=0.4
Caption="moNumericEdit Test"
CaptionWidth=0.6
MinValue=1
MaxValue=16
TabOrder=4
Hint="This is an INT numeric Edit box"
End Object
Begin Object class=moFloatEdit Name=cFour
WinWidth=0.5
WinHeight=0.050000
WinLeft=0.25
WinTop=0.5
MinValue=0.0
MaxValue=1.0
Step=0.05
Caption="moFloatEdit Test"
CaptionWidth=0.725
ComponentJustification=TXTA_Left
TabOrder=3
Hint="This is a FLOAT numeric Edit Box";
End Object
Begin Object class=GUILabel Name=laSix
WinWidth=0.226563
WinHeight=0.050000
WinLeft=0.375000
WinTop=0.654545
TextAlign=TXTA_Center
Caption="Slider Test"
End Object
Begin Object class=GUISlider Name=cSix
WinWidth=0.250000
WinLeft=0.367188
WinTop=0.713997
MinValue=0
MaxValue=1
Hint="This is a Slider Test."
TabOrder=5
End Object
CheckTest=cTwo
EditTest=cThree
FloatTest=cFour
NumEditTest=cFive
lbSliderTest=laSix
SliderTest=cSix
Background=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Backgrounds.bg11'
WinWidth=1.000000
WinHeight=0.807813
WinLeft=0.000000
WinTop=55.980499
}

View file

@ -0,0 +1,107 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class MyTestPanelB extends TestPanelBase;
var Automated moComboBox ComboTest;
var Automated GUILabel lbListBoxTest;
var Automated GUIListBox ListBoxTest;
var Automated GUILabel lbScrollTextBox;
var Automated GUIScrollTextBox ScrollTextBoxTest;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
local int i,c;
local string t;
Super.Initcomponent(MyController, MyOwner);
c = rand(30)+5;
for (i=0;i<c;i++)
ComboTest.AddItem("Test "$Rand(100));
c = rand(75)+25;
for (i=0;i<c;i++)
ListBoxTest.List.Add("Testing "$Rand(100));
ListBoxTest.SetFriendlyLabel(lbListBoxTest);
c = rand(75)+25;
for (i=0;i<c;i++)
{
if (t!="")
t = T $"|";
t = t$"All Work & No Play Makes Me Sad";
}
ScrollTextBoxTest.SetContent(t);
ScrollTextBoxTest.SetFriendlyLabel(lbScrollTextBox);
}
defaultproperties
{
Begin Object class=moComboBox Name=caOne
WinWidth=0.500000
WinHeight=0.060000
WinLeft=0.031250
WinTop=0.079339
Caption="moComboBox Test"
CaptionWidth=0.5
ComponentJustification=TXTA_Left
TabOrder=0
Hint="This is a combo box"
End Object
Begin Object class=GUILabel Name=laTwo
WinWidth=0.156250
WinHeight=0.050000
WinLeft=0.031250
WinTop=0.200000
Caption="ListBox Test"
End Object
Begin Object class=GUIListBox Name=caTwo
WinWidth=0.445313
WinHeight=0.706250
WinLeft=0.031250
WinTop=0.251653
TabOrder=1
bVisibleWhenEmpty=true
End Object
Begin Object class=GUILabel Name=laThree
WinWidth=0.257813
WinHeight=0.050000
WinLeft=0.515625
WinTop=0.200000
Caption="Scrolling Text Test"
End Object
Begin Object class=GUIScrollTextBox Name=caThree
WinWidth=0.445313
WinHeight=0.706250
WinLeft=0.515625
WinTop=0.251653
TabOrder=2
bVisibleWhenEmpty=true
CharDelay=0.05
End Object
ComboTest=caOne
lbListBoxTest=laTwo
ListBoxTest=caTwo
lbScrollTextBox=laThree
ScrollTextBoxTest=caThree
Background=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Backgrounds.bg11'
WinWidth=1.000000
WinHeight=0.807813
WinLeft=0.000000
WinTop=55.980499
}

View file

@ -0,0 +1,31 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class MyTestPanelC extends TestPanelBase;
var Automated GUISplitter MainSplitter;
defaultproperties
{
Begin Object class=GUISplitter Name=cOne
WinWidth=1
WinHeight=1
WinLeft=0
WinTop=0
DefaultPanels(0)="GUI2K4.MySubTestPanelA"
DefaultPanels(1)="GUI2K4.MySubTestPanelB"
SplitOrientation=SPLIT_Vertical
MaxPercentage=0.8
End Object
MainSplitter=cOne
Background=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Backgrounds.bg11'
WinWidth=1.000000
WinHeight=0.807813
WinLeft=0.000000
WinTop=55.980499
}

View file

@ -0,0 +1,98 @@
//==============================================================================
// Description
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class PlayInfoFilter extends BrowserFilters;
//==============================================================================
//
// PlayInfo interaction
//
// Set all values in PlayInfo
function LoadSettings(int FilterIndex)
{
local array<CustomFilter.AFilterRule> FilterRules;
local int i, j;
// log(Name@"LoadSettings FilterIndex:"$FilterIndex);
FilterRules = GetPlayInfoRules(FilterIndex);
for (j = 0; j < FilterRules.Length; j++)
{
i = FilterInfo.FindIndex(FilterRules[j].FilterItem.Key);
// log(Name@"LoadSettings Name:"$FilterInfo.Settings[i].SettingName@"Settings["$i$"].Data:"$FilterInfo.Settings[i].Data);
LoadData(FilterIndex, i, FilterRules[j]);
}
}
function array<CustomFilter.AFilterRule> GetPlayInfoRules(int Index, optional string Group)
{
local array<CustomFilter.AFilterRule> FilterRules;
local array<PlayInfo.PlayInfoData> Scope;
local int i, j;
if (ValidIndex(Index))
{
if (Group != "")
FilterInfo.GetSettings(Group, Scope);
else Scope = FilterInfo.Settings;
for (i = 0; i < Scope.Length; i++)
{
j = AllFilters[Index].FindRuleIndex(Scope[i].SettingName);
if ( AllFilters[Index].ValidIndex(j) )
{
FilterRules.Length = FilterRules.Length + 1;
AllFilters[Index].GetRule(j,FilterRules[FilterRules.Length-1]);
}
}
}
return FilterRules;
}
// Moves the stored value of a filter rule into the PlayInfo Setting
function LoadData(int FilterIndex, int PIIndex, CustomFilter.AFilterRule FilterRule)
{
local int i, j, pos;
local array<CustomFilter.CurrentFilter> Stored;
local string Min, Max, OrigRange;
i = AllFilters[FilterIndex].FindRuleIndex(FilterRule.FilterItem.Key);
if (i < 0)
return;
Stored = AllFilters[FilterIndex].GetRuleSetAt(i);
if (Stored.Length > 1)
{
for (j = 0; j < Stored.Length; j++)
{
if (Stored[j].Item.FilterType == DT_Ranged)
{
if (Stored[j].ItemIndex == 1)
Max = Stored[j].Item.FilterItem.Value;
else Min = Stored[j].Item.FilterItem.Value;
}
}
pos = InStr(FilterInfo.Settings[PIIndex].Data, ";");
if (pos != -1)
OrigRange = Mid(FilterInfo.Settings[PIIndex].Data, pos);
//log("Storing"@FilterInfo.Settings[PIIndex].SettingName@"Value: 0 Data:"$"3,"$Min$","$Max$OrigRange);
FilterInfo.StoreSetting(PIIndex, "0", "3,"$Min$","$Max$OrigRange);
}
else if (Stored.Length > 0)
{
FilterInfo.StoreSetting(PIIndex, Stored[0].Item.FilterItem.Value);
}
else
log("Unknown property:"$FilterRule.FilterItem.Key);
}
DefaultProperties
{
}

View file

@ -0,0 +1,49 @@
//==============================================================================
// List of all PlayInfo settings and their values.
//
// Created by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class PlayInfoList extends GUIMultiColumnList;
var PlayInfo GamePI;
// GamePI has been replaced, so reinit data
function Refresh()
{
local int i;
Clear();
for (i = 0; i < GamePI.Settings.Length; i++)
AddedItem();
}
function InternalOnDrawItem(Canvas Canvas, int i, float X, float Y, float W, float H, bool bSelected, bool bPending)
{
local float CellLeft, CellWidth;
GetCellLeftWidth( 0, CellLeft, CellWidth );
Style.DrawText( Canvas, MenuState, CellLeft, Y, CellWidth, H, TXTA_Left, GamePI.Settings[SortData[i].SortItem].DisplayName, FontScale );
GetCellLeftWidth( 1, CellLeft, CellWidth );
Style.DrawText( Canvas, MenuState, CellLeft, Y, CellWidth, H, TXTA_Left, GamePI.Settings[SortData[i].SortItem].Value, FontScale );
}
event string GetSortString(int ItemIndex)
{
if (SortColumn == 0)
return GamePI.Settings[SortData[ItemIndex].SortItem].DisplayName;
return GamePI.Settings[SortData[ItemIndex].SortItem].Value;
}
DefaultProperties
{
OnDrawItem=InternalOnDrawItem
IniOption="@Internal"
SortColumn=0
ExpandLastColumn=True
ColumnHeadings(0)="Setting Name"
ColumnHeadings(1)="Value"
}

View file

@ -0,0 +1,19 @@
//==============================================================================
// Listbox for the PlayInfoList
//
// Created by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class PlayInfoListBox extends GUIMultiColumnListBox;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
HeaderColumnPerc = UT2K4Tab_RulesBase(MyOwner).HeaderColumnPerc;
Super.InitComponent(MyController, MyOwner);
}
DefaultProperties
{
StyleName="ListBox"
DefaultListClass="GUI2K4.PlayInfoList"
}

View file

@ -0,0 +1,114 @@
//==============================================================================
// Created on: 10/10/2003
// Base class for non-fullscreen menus
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class PopupPageBase extends UT2K4GUIPage;
var automated FloatingImage i_FrameBG;
var bool bFading, bClosing;
var(Fade) config float FadeTime;
var(Fade) float CurFadeTime;
var(Fade) byte CurFade, DesiredFade;
delegate FadedIn();
delegate FadedOut();
event Opened(GUIComponent Sender)
{
if ( bCaptureInput )
FadeIn();
Super.Opened(Sender);
}
function bool InternalOnPreDraw( Canvas C )
{
if ( !bFading )
return false;
if (CurFadeTime >= 0.0)
{
CurFade += float(DesiredFade - CurFade) * (Controller.RenderDelta / CurFadeTime);
InactiveFadeColor = class'Canvas'.static.MakeColor(CurFade, CurFade, CurFade);
CurFadeTime -= Controller.RenderDelta;
if ( CurFadeTime < 0 )
{
CurFade = DesiredFade;
InactiveFadeColor = class'Canvas'.static.MakeColor(CurFade, CurFade, CurFade);
bFading = False;
if ( bClosing )
{
bClosing = False;
FadedOut();
}
else
FadedIn();
}
}
return false;
}
function FadeIn()
{
if ( Controller.bModulateStackedMenus )
{
bClosing = False;
bFading = True;
CurFadeTime = FadeTime;
}
else FadedIn();
}
function FadeOut()
{
if ( Controller.bModulateStackedMenus )
{
bFading = True;
bClosing = True;
CurFadeTime = FadeTime;
DesiredFade = default.CurFade;
}
else FadedOut();
}
defaultproperties
{
Begin Object Class=FloatingImage Name=FloatingFrameBackground
// if _RO_
// lazy emh
// Image=Texture'InterfaceArt_tex.Menu.RODisplay'
// else
Image=Texture'KF_InterfaceArt_tex.Menu.thin_border_SlightTransparent'
// end if _RO_
ImageRenderStyle=MSTY_Normal
ImageStyle=ISTY_Stretched
ImageColor=(R=255,G=255,B=255,A=255)
DropShadow=None
WinWidth=1
WinHeight=0.96
WinLeft=0
WinTop=0.04
RenderWeight=0.000003
bBoundToParent=True
bScaleToParent=True
End Object
i_FrameBG=FloatingFrameBackground
bRequire640x480=False
bRenderWorld=True
bCaptureInput=True
DesiredFade=80
CurFade=200
FadeTime=0.35
OnPreDraw=InternalOnPreDraw
BackgroundColor=(R=255,G=255,B=255,A=255)
BackgroundRStyle=MSTY_Modulated
}

View file

@ -0,0 +1,223 @@
//==============================================================================
// Created on: 11/23/2003
// GUI for server administration
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class RemoteAdmin extends LargeWindow;
var automated GUITitleBar t_Title;
var automated moComboBox co_Options;
var automated moCheckBox ch_Autologout;
var automated GUIImage i_Border;
var() noexport /*editconst*/ bool bLoggedIn;
var() config array<string> AdminOptionClass;
var() config bool bAutologout;
var() editconst noexport AdminPanelBase ap_Active;
var() localized string LoggedInText, LoggedOutText;
event InitComponent(GUIController C, GUIComponent O)
{
super.InitComponent(C, O);
InitializePanels();
}
event Opened(GUIComponent Sender)
{
Super.Opened(Sender);
Controller.OnAdminReply = InternalAdminReply;
ReloadActivePanel();
}
event Closed(GUIComponent Sender, bool bCancelled)
{
Super.Closed(Sender, bCancelled);
if ( bAutologout )
PlayerOwner().AdminCommand("AdminLogout");
Controller.OnAdminReply = None;
}
event bool NotifyLevelChange()
{
bPersistent = False;
LevelChanged();
return true;
}
function InitializePanels()
{
local int i;
local class<AdminPanelBase> panelclass;
co_Options.ResetComponent();
for ( i = 0; i < AdminOptionClass.Length; i++ )
{
if ( AdminOptionClass[i] == "" )
continue;
panelclass = class<AdminPanelBase>(DynamicLoadObject(AdminOptionClass[i], class'Class'));
if ( panelclass != None )
co_Options.AddItem( panelclass.default.PanelCaption, new(None) panelclass );
}
if ( IsAdmin() )
co_Options.MyComboBox.List.SilentSetIndex(1);
}
function ReloadActivePanel()
{
local AdminPanelBase panel;
panel = AdminPanelBase(co_Options.GetObject());
if ( panel != None )
{
if ( ap_Active != None )
RemoveComponent(ap_Active, True);
ap_Active = AdminPanelBase(AppendComponent(panel, True));
ap_Active.ShowPanel();
}
}
function bool IsAdmin()
{
return PlayerOwner() != None && PlayerOwner().PlayerReplicationInfo != None && PlayerOwner().PlayerReplicationInfo.bAdmin;
}
function InternalAdminReply( string Reply )
{
local int i;
local array<string> Results;
local string Key, Value;
if ( Reply == "" )
{
LoggedOut();
return;
}
log("Received AdminReply '"$Reply$"'");
Split(Reply, ";", Results);
for ( i = 0; i < Results.Length; i++ )
{
if ( Divide(Results[i], "=", Key, Value) )
{
if ( Key ~= "name" && IsAdmin() )
LoggedIn(Value);
else if ( Key ~= "adv" )
SetAdvanced(Value);
}
}
}
function LoggedIn( string AdminName )
{
t_Title.SetCaption( Repl(LoggedInText, "%name%", AdminName) );
EnableComponent(co_Options);
if ( !bLoggedIn )
{
bLoggedIn = True;
ap_Active.LoggedIn(AdminName);
}
}
function LoggedOut()
{
bLoggedIn = False;
ap_Active.LoggedOut();
t_Title.SetCaption( LoggedOutText );
co_Options.SetIndex(0);
DisableComponent(co_Options);
}
function SetAdvanced( coerce bool bIsAdvanced )
{
local int i;
local AdminPanelBase p;
for ( i = 0; i < co_Options.ItemCount(); i++ )
{
p = AdminPanelBase(co_Options.MyComboBox.List.GetObjectAtIndex(i));
if ( p != None )
p.SetAdvanced(bIsAdvanced);
}
}
function InternalOnChange( GUIComponent Sender )
{
switch ( Sender )
{
case co_Options:
ReloadActivePanel();
break;
case ch_Autologout:
bAutologout = ch_Autologout.IsChecked();
SaveConfig();
break;
}
}
DefaultProperties
{
AdminOptionClass(0)="GUI2K4.AdminPanelLogin"
AdminOptionClass(1)="GUI2K4.AdminPanelGeneral"
AdminOptionClass(2)="GUI2K4.AdminPanelMaps"
AdminOptionClass(3)="GUI2K4.AdminPanelPlayers"
LoggedInText="Logged in as '%name%'"
LoggedOutText="Not logged in"
Begin Object Class=moComboBox Name=OptionsCombo
WinWidth=0.595311
WinHeight=0.078125
WinLeft=0.010625
WinTop=0.031249
bScaleToParent=True
bBoundToParent=True
OnChange=InternalOnChange
bReadOnly=True
Caption="Section:"
Hint="Select the desired group of administration options to configure"
MenuState=MSAT_Disabled
CaptionWidth=0.27
End Object
co_Options=OptionsCombo
Begin Object Class=moCheckBox Name=AutoLogout
WinWidth=0.312500
WinHeight=0.078125
WinLeft=0.668750
WinTop=0.031249
Caption="AutoLogout"
Hint="Enable to automatically logout as admin when this menu is closed."
OnChange=InternalOnChange
bAutoSizeCaption=True
End Object
ch_Autologout=AutoLogout
Begin Object Class=GUIImage Name=BorderImage
Image=Texture'InterfaceArt_tex.Menu.changeme_texture' //Texture'InterfaceContent.Menu.BorderBoxD'
ImageColor=(A=160)
ImageStyle=ISTY_Stretched
WinWidth=1.0
WinHeight=0.016522
WinLeft=0.0
WinTop=0.122862
bBoundToParent=True
bScaleToParent=True
End Object
i_Border=BorderImage
}

View file

@ -0,0 +1,174 @@
//==============================================================================
// Created on: 11/23/2003
// Manages playinfo settings for remote server
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class RemotePlayInfoPanel extends UT2K4PlayInfoPanel;
delegate SettingChanged( string SettingName, string NewValue );
function InitComponent( GUIController InController, GUIComponent InOwner )
{
Super.InitComponent(InController, InOwner);
lb_Rules.FillOwner();
}
function PlayInfo GetPlayInfo()
{
if ( GamePI == None )
GamePI = new(None) class'PlayInfo';
return GamePI;
}
function ReceivedRule( string PropertyName, string ClassName, string CurrentValue )
{
local int i;
local class<Info> OwnerClass;
GetPlayInfo();
i = GamePI.FindIndex(PropertyName);
if( i == -1 ) // setting not found, need to load it
{
OwnerClass = class<Info>(DynamicLoadObject(ClassName,class'Class'));
if (OwnerClass != None)
{
OwnerClass.static.FillPlayInfo(GamePI);
i = GamePI.FindIndex(PropertyName);
if( i == -1 )
{
log("Failed to find PlayInfo Setting " $ PropertyName);
return;
}
}
else
{
Log("Failed to load " $ ClassName);
return;
}
}
StoreSetting(i, CurrentValue);
InfoRules[InfoRules.Length] = GamePI.Settings[i];
}
function ReceivedValue( string SettingName, string Value )
{
local int gidx, ridx, lidx;
gidx = GamePI.FindIndex(SettingName);
if ( gidx != -1 )
{
ridx = GetInfoRuleIndex(gidx);
if ( ridx != -1 )
{
lidx = FindComponentWithTag(ridx);
if ( lidx >= 0 && lidx < li_Rules.Elements.Length )
li_Rules.Elements[lidx].SetComponentValue(Value,True);
}
}
}
function ClearRules()
{
if ( GamePI != None )
GamePI.Clear();
InfoRules.Remove(0, InfoRules.Length);
}
function Refresh()
{
Super.ClearRules();
LoadRules();
}
function LoadRules()
{
local int i, idx, lastidx;
GamePI.Sort(0);
lastidx = -1;
for ( i = 0; i < GamePI.Settings.Length; i++ )
{
idx = GetInfoRuleIndex(i);
if ( idx != -1 )
{
if ( lastidx == -1 || InfoRules[idx].Grouping != InfoRules[lastidx].Grouping )
AddGroupHeader(idx, li_Rules.Elements.Length == 0);
AddRule(InfoRules[idx], idx);
lastidx = idx;
}
}
Super.LoadRules();
}
function int GetInfoRuleIndex( int GamePIIndex )
{
local int i;
if ( GamePI == None || GamePIIndex < 0 || GamePIIndex >= GamePI.Settings.Length )
return -1;
for ( i = 0; i < InfoRules.Length; i++ )
if ( InfoRules[i].SettingName ~= GamePI.Settings[GamePIIndex].SettingName )
return i;
return -1;
}
function UpdateSetting(GUIMenuOption Sender)
{
local int i;
local int Index;
local string Value;
if (Sender == None)
return;
i = Sender.Tag;
if (i < 0)
return;
GetPlayInfo();
if (InfoRules[i].DisplayName != Sender.Caption)
{
if ( Controller.bModAuthor )
{
log("Corrupt list index detected in component"@Sender.Name,'ModAuthor');
DumpListElements( FindComponentIndex(Sender), i );
}
return;
}
Index = GamePI.FindIndex(InfoRules[i].SettingName);
if (InfoRules[i].DisplayName != Sender.Caption || Index == -1)
{
if ( Controller.bModAuthor )
{
log("Invalid setting requested from PlayInfo!",'ModAuthor');
DumpListElements(FindComponentIndex(Sender), i);
}
return;
}
Value = Sender.GetComponentValue();
StoreSetting(Index, Value);
SettingChanged( GamePI.Settings[Index].SettingName, GamePI.Settings[Index].Value );
}
/*
event Free()
{
GamePI = None;
Super.Free();
}
*/
DefaultProperties
{
NumColumns=2
}

View file

@ -0,0 +1,117 @@
//==============================================================================
// Class to hold the single player highscores
//
// Written by Michiel Hendriks
// (c) 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class SPHighScore extends SPHighScoreBase;
struct HighScoreEntry
{
var string Name;
var int Balance;
var int Matches;
var int Wins;
var float Difficulty;
var bool bDrone; // false if it's a real entry
};
/** sorted list */
var array<HighScoreEntry> Scores;
var int MaxEntries;
var localized string CheaterName;
/** To prevent cheating */
var protected string PlayerIDHash;
delegate CharUnlocked( string CharName );
/** return's true when added */
function int AddHighScore(UT2K4GameProfile GP)
{
local int i, newscore;
local HighScoreEntry newEntry;
if (GP.isCheater()) newEntry.Name = CheaterName;
else newEntry.Name = GP.PlayerName;
newEntry.Balance = GP.Balance;
newEntry.Matches = GP.Matches;
newEntry.Wins = GP.Wins;
newEntry.Difficulty = GP.Difficulty;
newEntry.bDrone = false;
newscore = CalcScore(newEntry);
for (i = 0; i < Scores.length; i++)
{
// find first worse entry
if (CalcScore(Scores[i]) < newscore) break;
}
if (i >= MaxEntries) return -1;
Scores.Insert(i, 1);
Scores[i] = newEntry;
Scores.length = MaxEntries;
return i;
}
static function int CalcScore(HighScoreEntry entry)
{
local int res;
res = (entry.Difficulty*100000)-(entry.Matches*100)+entry.Balance;
return res;
}
function UnlockChar(string char, optional string PlayerHash)
{
local int i;
if ((PlayerIDHash != PlayerHash) && (PlayerHash != ""))
{
UnlockedChars.length = 0;
PlayerIDHash = PlayerHash;
}
for (i = 0; i < UnlockedChars.length; i++)
{
if (UnlockedChars[i] == Char) return;
}
UnlockedChars.length = UnlockedChars.length+1;
UnlockedChars[UnlockedChars.length-1] = char;
if ( char != "" )
CharUnlocked(char);
}
function string StoredPlayerID()
{
return PlayerIDHash;
}
defaultproperties
{
CheaterName="*** CHEATER ***"
MaxEntries=25
Scores[0]=(Name="Xan Kriegor",Balance=5000,Matches=40,Wins=40,Difficulty=2,bDrone=true)
Scores[1]=(Name="Clan Lord",Balance=4900,Matches=45,Wins=41,Difficulty=2,bDrone=true)
Scores[2]=(Name="Malcolm",Balance=4800,Matches=50,Wins=42,Difficulty=2,bDrone=true)
Scores[3]=(Name="Dominator",Balance=4700,Matches=55,Wins=43,Difficulty=2,bDrone=true)
Scores[4]=(Name="Enigma",Balance=4600,Matches=60,Wins=44,Difficulty=2,bDrone=true)
Scores[5]=(Name="Jakob",Balance=4500,Matches=65,Wins=45,Difficulty=2,bDrone=true)
Scores[6]=(Name="Cyclops",Balance=4400,Matches=70,Wins=46,Difficulty=2,bDrone=true)
Scores[7]=(Name="Drekorig",Balance=4300,Matches=75,Wins=47,Difficulty=2,bDrone=true)
Scores[8]=(Name="Aryss",Balance=4200,Matches=80,Wins=48,Difficulty=2,bDrone=true)
Scores[9]=(Name="Axon",Balance=4100,Matches=85,Wins=49,Difficulty=2,bDrone=true)
Scores[10]=(Name="Skakruk",Balance=4000,Matches=90,Wins=50,Difficulty=2,bDrone=true)
Scores[11]=(Name="Tamika",Balance=3900,Matches=95,Wins=51,Difficulty=2,bDrone=true)
Scores[12]=(Name="Cathode",Balance=3800,Matches=100,Wins=52,Difficulty=2,bDrone=true)
Scores[13]=(Name="Guardian",Balance=3700,Matches=105,Wins=53,Difficulty=2,bDrone=true)
Scores[14]=(Name="Othello",Balance=3600,Matches=110,Wins=54,Difficulty=2,bDrone=true)
Scores[15]=(Name="Kraagesh",Balance=3500,Matches=115,Wins=55,Difficulty=2,bDrone=true)
Scores[16]=(Name="Azure",Balance=3400,Matches=120,Wins=56,Difficulty=2,bDrone=true)
Scores[17]=(Name="Mr.Crow",Balance=3300,Matches=125,Wins=57,Difficulty=2,bDrone=true)
Scores[18]=(Name="Gaargod",Balance=3200,Matches=130,Wins=58,Difficulty=2,bDrone=true)
Scores[19]=(Name="Annika",Balance=3100,Matches=135,Wins=59,Difficulty=2,bDrone=true)
Scores[20]=(Name="Greith",Balance=3000,Matches=140,Wins=60,Difficulty=2,bDrone=true)
Scores[21]=(Name="Gkublok",Balance=2900,Matches=145,Wins=61,Difficulty=2,bDrone=true)
Scores[22]=(Name="Zarina",Balance=2800,Matches=150,Wins=62,Difficulty=2,bDrone=true)
Scores[23]=(Name="Gorge",Balance=2700,Matches=155,Wins=63,Difficulty=2,bDrone=true)
Scores[24]=(Name="Perdition",Balance=2600,Matches=160,Wins=64,Difficulty=2,bDrone=true)
}

View file

@ -0,0 +1,20 @@
//==============================================================================
// Created on: 11/22/2003
// Base class for single player high scores
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class SPHighScoreBase extends Object
abstract;
/** Menu labels of chars unlocked */
var array<string> UnlockedChars;
function UnlockChar(string char, optional string PlayerHash);
function string StoredPlayerID();
DefaultProperties
{
}

View file

@ -0,0 +1,507 @@
//==============================================================================
// Exports the profile to a text file
//
// Written by Michiel Hendriks
// (c) 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class SPProfileExporter extends Object;
var string ResultFile;
var protected string FileName;
var protected string FileExt;
var protected UT2K4GameProfile GP;
var protected FileLog Output;
var protected LevelInfo Level;
function bool Create(UT2K4GameProfile myGP, LevelInfo myLevel, optional string myFilename, optional string myExt)
{
GP = myGP;
Level = myLevel;
if (myFilename != "") filename = myFilename;
filename = FormatString(filename);
if (myExt != "") FileExt = MyExt;
return (GP != none) && (Level != none);
}
function ExportProfile()
{
if (!(GP != none) && (Level != none)) return;
Output = Level.spawn(class'FileLog');
Output.OpenLog(FileName, FileExt, true);
ResultFile = Output.LogFileName;
expHeader();
expBody();
expFooter();
Output.CloseLog();
}
/** export the header */
protected function expHeader()
{
output.Logf("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
output.Logf("<html><head>");
output.Logf("<title>UT2004 Exported Single Player Details -"@GP.PackageName@"</title>");
output.Logf("<meta name=\"Generator\" content=\"UnrealEngine2 build "$Level.EngineVersion$" - exporter: "$string(self.Class)$"\">");
expStyle();
output.Logf("</head><body>");
output.Logf("<div class=\"title\">UT2004 Exported Profile</div>");
output.Logf("<table class=\"tabpages\">");
output.Logf("<colgroup><col width=\"1*\"><col width=\"1*\"><col width=\"1*\"><col width=\"1*\"><col width=\"1*\"><col width=\"1*\"><col width=\"1*\"></colgroup>");
output.Logf("<tr>");
output.Logf("<td class=\"tab\" id=\"a_d_basic\" onclick=\"showDiv('d_basic');\" onmouseover=\"tabHover('a_d_basic', true);\" onmouseout=\"tabHover('a_d_basic', false);\">Basic</td>");
output.Logf("<td class=\"tab\" id=\"a_d_awards\" onclick=\"showDiv('d_awards');\" onmouseover=\"tabHover('a_d_awards', true);\" onmouseout=\"tabHover('a_d_awards', false);\">Awards</td>");
output.Logf("<td class=\"tab\" id=\"a_d_ladders\" onclick=\"showDiv('d_ladders');\" onmouseover=\"tabHover('a_d_ladders', true);\" onmouseout=\"tabHover('a_d_ladders', false);\">Ladders</td>");
output.Logf("<td class=\"tab\" id=\"a_d_botstats\" onclick=\"showDiv('d_botstats');\" onmouseover=\"tabHover('a_d_botstats', true);\" onmouseout=\"tabHover('a_d_botstats', false);\">Bot stats</td>");
output.Logf("<td class=\"tab\" id=\"a_d_teamstats\" onclick=\"showDiv('d_teamstats');\" onmouseover=\"tabHover('a_d_teamstats', true);\" onmouseout=\"tabHover('a_d_teamstats', false);\">Team stats</td>");
output.Logf("<td class=\"tab\" id=\"a_d_lastmatch\" onclick=\"showDiv('d_lastmatch');\" onmouseover=\"tabHover('a_d_lastmatch', true);\" onmouseout=\"tabHover('a_d_lastmatch', false);\">Last match</td>");
output.Logf("<td class=\"tab\" id=\"a_d_history\" onclick=\"showDiv('d_history');\" onmouseover=\"tabHover('a_d_history', true);\" onmouseout=\"tabHover('a_d_history', false);\">Fight history</td>");
output.Logf("</tr>");
output.Logf("</table>");
}
/** write inline style */
protected function expStyle()
{
output.Logf("<style>");
output.Logf("BODY { font-family: sans-serif; color: white; background-color: midnightblue; }");
output.Logf("TABLE { border: 2px outset navy; text-align: center; width: 100%; }");
output.Logf("TH { color: gold; font-size: smaller; text-align: center; }");
output.Logf("TD { vertical-align: top; border: 1px inset navy; empty-cells: show; padding: 2px; text-align: center; }");
output.Logf("TD.right { text-align: right; }");
output.Logf("DIV.title { font-size: xx-large; width: 100%; border: 3px outset gold; text-align: center; font-weight: bold; background-color: gold; color: midnightblue; margin-bottom: 10px; }");
output.Logf("H1 { border-bottom: 2px solid gold; text-align: center; }");
output.Logf("H2 { border-bottom: 2px solid gold; text-align: center; }");
output.Logf("H3 { border-bottom: 1px solid gold; text-align: center; }");
output.Logf("TR:Hover { background-color: navy; }");
output.Logf("DIV.hidden { visibility: hidden; position: absolute; width: 75%; margin-left: 12.5%; }");
output.Logf("TABLE.tabpages { border: none; }");
output.Logf("TD.tab { vertical-align: top; border: 2px outset navy; padding: 2px; background-color: midnightblue; cursor: pointer; }");
output.Logf("TD.tab_hover { border: 2px outset gold; background-color: navy; cursor: pointer; }");
output.Logf("TD.activetab { vertical-align: top; border: 2px outset gold; padding: 2px; background-color: gold; color: navy; cursor: default; }");
output.Logf("</style>");
}
/** export the footer */
protected function expFooter()
{
output.Logf("<script language=\"javascript\">");
output.Logf("curtd = null;");
output.Logf("curlb = null;");
output.Logf("function showDiv(divname)");
output.Logf("{");
output.Logf(" seltd = document.getElementById(divname);");
output.Logf(" if (curtd && seltd == curtd) return;");
output.Logf(" seltd.style.visibility = 'visible';");
output.Logf(" if (curtd) curtd.style.visibility = 'hidden';");
output.Logf(" curtd = seltd;");
output.Logf(" seltb = document.getElementById(\"a_\"+divname);");
output.Logf(" seltb.className = \"activetab\";");
output.Logf(" if (curlb) curlb.className = \"tab\";");
output.Logf(" curlb = seltb;");
output.Logf("}");
output.Logf("function tabHover(divname, active)");
output.Logf("{");
output.Logf(" hovertd = document.getElementById(divname);");
output.Logf(" if (hovertd == curlb) return;");
output.Logf(" if (hovertd) ");
output.Logf(" {");
output.Logf(" if (active) hovertd.className = \"tab_hover\"");
output.Logf(" else hovertd.className = \"tab\";");
output.Logf(" }");
output.Logf("}");
output.Logf("showDiv(\"d_basic\");");
output.Logf("</script>");
output.Logf("</body></html>");
}
/** export all the content */
protected function expBody()
{
expBasic();
expSprees();
expMultiKills();
expSpecialAwards();
expLadderStatus();
expBotstats();
expTeamstats();
expLastmatch();
expOtherMatches();
expHistory();
}
protected function expBasic()
{
output.Logf("<div id=\"d_basic\" class=\"hidden\">");
output.Logf("<h1>Profile</h1>");
output.Logf("<table id=\"t_basic\">");
output.Logf("<tr id=\"b_profile\"><td>Profile name</td><td>"@GP.PackageName@"</td></tr>");
output.Logf("<tr id=\"b_name\"><td>Player name</td><td>"@GP.PlayerName@"</td></tr>");
output.Logf("<tr id=\"b_difficulty\"><td>Difficulty</td><td>"@GP.BaseDifficulty@"</td></tr>");
if (GP.IsCheater()) output.logf("<tr id=\"b_cheated\"><td>CHEATED</td><td>true</td></tr>");
output.Logf("<tr id=\"b_character\"><td>Character</td><td>"@GP.PlayerCharacter@"</td></tr>");
output.Logf("<tr id=\"b_teamname\"><td>Team name</td><td>"@GP.TeamName@"</td></tr>");
output.Logf("<tr id=\"b_teammembers\"><td>Team members</td><td>"@JoinArray(GP.PlayerTeam, "<br />", true)@"</td></tr>");
output.Logf("<tr id=\"b_balance\"><td>Balance</td><td class=\"right\">"@GP.MoneyToString(GP.Balance)@"</td></tr>");
output.Logf("<tr id=\"b_matches\"><td>Matches</td><td class=\"right\">"@GP.matches@"</td></tr>");
output.Logf("<tr id=\"b_wins\"><td>Wins</td><td class=\"right\">"@GP.wins@"</td></tr>");
output.Logf("<tr id=\"b_kills\"><td>Kills</td><td class=\"right\">"@GP.kills@"</td></tr>");
output.Logf("<tr id=\"b_deaths\"><td>Deaths</td><td class=\"right\">"@GP.deaths@"</td></tr>");
output.Logf("</table>");
output.Logf("</div>");
}
protected function expSprees()
{
output.Logf("<div id=\"d_awards\" class=\"hidden\">");
output.Logf("<h1>Killing sprees</h1>");
output.Logf("<table id=\"t_sprees\">");
output.Logf("<tr id=\"ks_spree\"><td>Killing Spree</td><td class=\"right\">"@GP.spree[0]@"</td></tr>");
output.Logf("<tr id=\"ks_rampage\"><td>Rampage</td><td class=\"right\">"@GP.spree[1]@"</td></tr>");
output.Logf("<tr id=\"ks_dominating\"><td>Dominating</td><td class=\"right\">"@GP.spree[2]@"</td></tr>");
output.Logf("<tr id=\"ks_unstoppable\"><td>Unstoppable</td><td class=\"right\">"@GP.spree[3]@"</td></tr>");
output.Logf("<tr id=\"ks_godlike\"><td>GODLIKE</td><td class=\"right\">"@GP.spree[4]@"</td></tr>");
output.Logf("<tr id=\"ks_wickedsick\"><td>WICKED SICK</td><td class=\"right\">"@GP.spree[5]@"</td></tr>");
output.Logf("</table>");
}
protected function expMultiKills()
{
output.Logf("<h1>Multi kills</h1>");
output.Logf("<table id=\"t_multikills\">");
output.Logf("<tr id=\"mk_double\"><td>Double Kill</td><td class=\"right\">"@GP.MultiKills[0]@"</td></tr>");
output.Logf("<tr id=\"mk_multi\"><td>MultiKill</td><td class=\"right\">"@GP.MultiKills[1]@"</td></tr>");
output.Logf("<tr id=\"mk_mega\"><td>MegaKill</td><td class=\"right\">"@GP.MultiKills[2]@"</td></tr>");
output.Logf("<tr id=\"mk_ultra\"><td>UltraKill</td><td class=\"right\">"@GP.MultiKills[3]@"</td></tr>");
output.Logf("<tr id=\"mk_monster\"><td>MONSTER KILL</td><td class=\"right\">"@GP.MultiKills[4]@"</td></tr>");
output.Logf("<tr id=\"mk_ludicrous\"><td>LUDICROUS KILL</td><td class=\"right\">"@GP.MultiKills[5]@"</td></tr>");
output.Logf("<tr id=\"mk_holyshit\"><td>HOLY SHIT</td><td class=\"right\">"@GP.MultiKills[6]@"</td></tr>");
output.Logf("</table>");
}
protected function expSpecialAwards()
{
output.Logf("<h1>Special awards</h1>");
output.Logf("<table id=\"t_awards\">");
output.Logf("<tr id=\"sa_monkey\"><td>Flak Monkey</td><td class=\"right\">"@GP.SpecialAwards[0]@"</td></tr>");
output.Logf("<tr id=\"sa_whore\"><td>Combo Whore</td><td class=\"right\">"@GP.SpecialAwards[1]@"</td></tr>");
output.Logf("<tr id=\"sa_hunter\"><td>Head Hunter</td><td class=\"right\">"@GP.SpecialAwards[2]@"</td></tr>");
output.Logf("<tr id=\"sa_rampage\"><td>Road Rampage</td><td class=\"right\">"@GP.SpecialAwards[3]@"</td></tr>");
output.Logf("<tr id=\"sa_trick\"><td>Hat Trick</td><td class=\"right\">"@GP.SpecialAwards[4]@"</td></tr>");
output.Logf("<tr id=\"sa_untouchable\"><td>Untouchable</td><td class=\"right\">"@GP.SpecialAwards[5]@"</td></tr>");
output.Logf("</table>");
output.Logf("</div>");
}
protected function expLadderStatus()
{
local int i;
local class<CustomLadderInfo> cl;
output.Logf("<div id=\"d_ladders\" class=\"hidden\">");
output.Logf("<h1>Ladder status</h1>");
output.Logf("<table id=\"t_ladders\">");
if (GP.LadderProgress[GP.UT2K4GameLadder.default.LID_DM] > -1)
output.Logf("<tr id=\"ls_qualification\"><td>Qualification</td><td class=\"right\">"$(GP.LadderProgress[GP.UT2K4GameLadder.default.LID_DM]*100/GP.LengthOfLadder(GP.UT2K4GameLadder.default.LID_DM))$"%</td></tr>");
else output.Logf("<tr id=\"ls_qualification\"><td>Qualification</td><td>locked</td></tr>");
if (GP.LadderProgress[GP.UT2K4GameLadder.default.LID_TDM] > -1)
output.Logf("<tr id=\"ls_teamqualification\"><td>Team Qualification</td><td class=\"right\">"$(GP.LadderProgress[GP.UT2K4GameLadder.default.LID_TDM]*100/GP.LengthOfLadder(GP.UT2K4GameLadder.default.LID_TDM))$"%</td></tr>");
else output.Logf("<tr id=\"ls_teamqualification\"><td>Team Qualification</td><td>locked</td></tr>");
if (GP.LadderProgress[GP.UT2K4GameLadder.default.LID_CTF] > -1)
output.Logf("<tr id=\"ls_ctf\"><td>Capture The Flag</td><td class=\"right\">"$(GP.LadderProgress[GP.UT2K4GameLadder.default.LID_CTF]*100/GP.LengthOfLadder(GP.UT2K4GameLadder.default.LID_CTF))$"%</td></tr>");
else output.Logf("<tr id=\"ls_ctf\"><td>Capture The Flag</td><td>locked</td></tr>");
if (GP.LadderProgress[GP.UT2K4GameLadder.default.LID_BR] > -1)
output.Logf("<tr id=\"ls_br\"><td>Bombing Run</td><td class=\"right\">"$(GP.LadderProgress[GP.UT2K4GameLadder.default.LID_BR]*100/GP.LengthOfLadder(GP.UT2K4GameLadder.default.LID_BR))$"%</td></tr>");
else output.Logf("<tr id=\"ls_br\"><td>Bombing Run</td><td>locked</td></tr>");
if (GP.LadderProgress[GP.UT2K4GameLadder.default.LID_DOM] > -1)
output.Logf("<tr id=\"ls_dom\"><td>Double Domination</td><td class=\"right\">"$(GP.LadderProgress[GP.UT2K4GameLadder.default.LID_DOM]*100/GP.LengthOfLadder(GP.UT2K4GameLadder.default.LID_DOM))$"%</td></tr>");
else output.Logf("<tr id=\"ls_dom\"><td>Double Domination</td><td>locked</td></tr>");
if (GP.LadderProgress[GP.UT2K4GameLadder.default.LID_AS] > -1)
output.Logf("<tr id=\"ls_as\"><td>Assault</td><td class=\"right\">"$(GP.LadderProgress[GP.UT2K4GameLadder.default.LID_AS]*100/GP.LengthOfLadder(GP.UT2K4GameLadder.default.LID_AS))$"%</td></tr>");
else output.Logf("<tr id=\"ls_as\"><td>Assault</td><td>locked</td></tr>");
if (GP.LadderProgress[GP.UT2K4GameLadder.default.LID_CHAMP] > -1)
output.Logf("<tr id=\"ls_champ\"><td>Championship</td><td class=\"right\">"$(GP.LadderProgress[GP.UT2K4GameLadder.default.LID_CHAMP]*100/GP.LengthOfLadder(GP.UT2K4GameLadder.default.LID_CHAMP))$"%</td></tr>");
else output.Logf("<tr id=\"ls_champ\"><td>Championship</td><td>locked</td></tr>");
if (GP.CustomLadders.Length > 0)
{
output.Logf("<tr><td colspan=\"2\">Additional ladders</tr></td>");
for (i = 0; i < GP.CustomLadders.Length; i++)
{
cl = class<CustomLadderInfo>(DynamicLoadObject(GP.CustomLadders[i].LadderClass, class'Class'));
if (cl != none)
{
output.Logf("<tr id=\"lsc_"$repl(GP.CustomLadders[i].LadderClass, ".", "_")$"\"><td>"$cl.default.LadderName$"</td><td class=\"right\">"$(GP.CustomLadders[i].progress*100/cl.default.Matches.Length)$"%</td></tr>");
}
else {
output.Logf("<tr id=\"lsc_"$repl(GP.CustomLadders[i].LadderClass, ".", "_")$"\"><td>"$GP.CustomLadders[i].LadderClass$"</td><td>"$GP.CustomLadders[i].progress@"matches</td></tr>");
}
}
}
output.Logf("</table>");
output.Logf("</div>");
}
protected function expBotstats()
{
local int i;
output.Logf("<div id=\"d_botstats\" class=\"hidden\">");
output.Logf("<h1>Bot stats</h1>");
output.Logf("<table id=\"t_botstats\">");
output.Logf("<tr><th>Name</th><th>Price</th><th>Health</th><th>Team ID</th><tr>");
for (i = 0; i < GP.BotStats.length; i++)
{
output.Logf("<tr id=\"bs_"$repl(GP.BotStats[i].Name, ".", "_")$"\"><td>"$GP.BotStats[i].Name$"</td><td class=\"right\">"$GP.MoneyToString(GP.BotStats[i].Price)$"</td><td class=\"right\">"$GP.BotStats[i].Health$"%</td><td class=\"right\">"$GP.BotStats[i].TeamId$"</td></tr>");
}
output.Logf("</table>");
output.Logf("</div>");
}
protected function expTeamstats()
{
local int i;
local string tmp;
output.Logf("<div id=\"d_teamstats\" class=\"hidden\">");
output.Logf("<h1>Team stats</h1>");
output.Logf("<table id=\"t_teamstats\">");
output.Logf("<tr><th>ID</th><th>Name</th><th>Matches</th><th>Lost from</th><th>Rating</th><th>Level</th><th>Roster</th><tr>");
for (i = 0; i < GP.TeamStats.length; i++)
{
if (GP.TeamStats[i].Name == "") continue;
output.Logf("<tr id=\"ts_"$repl(GP.TeamStats[i].Name, ".", "_")$"\"><td class=\"right\">"$i$"</td><td>"$getTeamName(GP.TeamStats[i].Name, tmp)$"</td><td class=\"right\">"$GP.TeamStats[i].Matches$"</td><td class=\"right\">"$GP.TeamStats[i].Won$"</td><td class=\"right\">"$GP.TeamStats[i].Rating$"</td><td class=\"right\">"$GP.TeamStats[i].Level$"</td><td>"$tmp$"</td></tr>");
}
output.Logf("</table>");
output.Logf("</div>");
}
protected function expLastmatch()
{
local int i;
local string tmp;
output.Logf("<div id=\"d_lastmatch\" class=\"hidden\">");
output.Logf("<h1>Last match</h1>");
output.Logf("<table id=\"t_lastmatch_basic\">");
output.Logf("<tr id=\"lm_gametype\"><td>Game type</td><td>"$GP.lmdGameType$"</td></tr>");
output.Logf("<tr id=\"lm_map\"><td>Map</td><td>"$GP.lmdMap$"</td></tr>");
output.Logf("<tr id=\"lm_won\"><td>Won match</td><td>"$GP.lmdWonMatch$"</td></tr>");
output.Logf("<tr id=\"lm_time\"><td>Game time</td><td>"$(GP.lmdGameTime/60)@"minutes</td></tr>");
output.Logf("<tr id=\"lm_prize\"><td>Prize money</td><td>"$GP.MoneyToString(GP.lmdPrizeMoney)$"</td></tr>");
output.Logf("<tr id=\"lm_bonus\"><td>Total bonus money</td><td>"$GP.MoneyToString(GP.lmdTotalBonusMoney)$"</td></tr>");
output.Logf("<tr id=\"lm_balance\"><td>Balance change</td><td>"$GP.MoneyToString(GP.lmdBalanceChange)$"</td></tr>");
if (GP.lmdInjury > -1)
{
output.Logf("<tr id=\"lm_injured\"><td>Injured team mate</td><td>"$GP.BotStats[GP.lmdInjury].Name$"</td></tr>");
output.Logf("<tr id=\"lm_injury_health\"><td>Injury health</td><td>"$GP.lmdInjuryHealth$"</td></tr>");
output.Logf("<tr id=\"lm_treatment\"><td>Injury treatment</td><td>"$GP.MoneyToString(GP.lmdInjuryTreatment)$"</td></tr>");
}
output.Logf("</table>");
if (GP.PayCheck.length > 0)
{
output.Logf("<h2>Pay check overview</h2>");
output.Logf("<table id=\"t_lastmatch_paycheck\">");
output.Logf("<tr><th>Name</th><th>Payment</th></tr>");
for (i = 0; i < GP.PayCheck.length; i++)
{
output.Logf("<tr id=\"lmp_"$repl(GP.BotStats[GP.PayCheck[i].BotId].Name, ".", "_")$"\"><td>"$GP.BotStats[GP.PayCheck[i].BotId].Name$"</td><td class=\"right\">"$GP.MoneyToString(GP.PayCheck[i].Payment)$"</td></tr>");
}
output.Logf("</table>");
}
output.Logf("<h2>Last match player overview</h2>");
output.Logf("<table id=\"t_lastmatch_overview\">");
output.Logf("<tr><th>Name</th><th>Kills</th><th>Score</th><th>Deaths</th><th>Special Awards</th></tr>");
if (GP.lmdTeamGame)
{
output.Logf("<tr><th colspan=\"5\">"$GP.TeamName$"</th></tr>");
for (i = 0; i < GP.PlayerMatchDetails.length; i++)
{
if (GP.PlayerMatchDetails[i].Team == GP.lmdMyTeam)
{
output.Logf("<tr id=\"lmd_"$repl(GP.PlayerMatchDetails[i].Name, ".", "_")$"\"><td>"$GP.PlayerMatchDetails[i].Name$"</td><td class=\"right\">"$GP.PlayerMatchDetails[i].Kills$"</td><td class=\"right\">"$GP.PlayerMatchDetails[i].Score$"</td><td class=\"right\">"$GP.PlayerMatchDetails[i].Deaths$"</td><td>"$JoinArray(GP.PlayerMatchDetails[i].SpecialAwards, ", ")$"</td></tr");
}
}
output.Logf("<tr><th colspan=\"5\">"$getTeamName(GP.lmdEnemyTeam, tmp)$"</th></tr>");
for (i = 0; i < GP.PlayerMatchDetails.length; i++)
{
if (GP.PlayerMatchDetails[i].Team != GP.lmdMyTeam)
{
output.Logf("<tr id=\"lmd_"$repl(GP.PlayerMatchDetails[i].Name, ".", "_")$"\"><td>"$GP.PlayerMatchDetails[i].Name$"</td><td class=\"right\">"$GP.PlayerMatchDetails[i].Kills$"</td><td class=\"right\">"$GP.PlayerMatchDetails[i].Score$"</td><td class=\"right\">"$GP.PlayerMatchDetails[i].Deaths$"</td><td>"$JoinArray(GP.PlayerMatchDetails[i].SpecialAwards, ", ")$"</td></tr");
}
}
}
else {
for (i = 0; i < GP.PlayerMatchDetails.length; i++)
{
output.Logf("<tr id=\"lmd_"$repl(GP.PlayerMatchDetails[i].Name, ".", "_")$"\"><td>"$GP.PlayerMatchDetails[i].Name$"</td><td class=\"right\">"$GP.PlayerMatchDetails[i].Kills$"</td><td class=\"right\">"$GP.PlayerMatchDetails[i].Score$"</td><td class=\"right\">"$GP.PlayerMatchDetails[i].Deaths$"</td><td>"$JoinArray(GP.PlayerMatchDetails[i].SpecialAwards, ", ")$"</td></tr");
}
}
output.Logf("</table>");
}
protected function expOtherMatches()
{
local int i;
local string tmp;
local UT2K4MatchInfo MI;
if (GP.PhantomMatches.length <= 0)
{
output.Logf("</div>");
return;
}
output.Logf("<h2>Other tournament matches</h2>");
output.Logf("<table id=\"t_othermatches\">");
for (i = 0; i < GP.PhantomMatches.length; i++)
{
output.Logf("<tr id=\"om_"$i$"_vs\"><th>"$getTeamName(GP.TeamStats[GP.PhantomMatches[i].Team1].Name, tmp)@"</th><td>vs</td><th>"@getTeamName(GP.TeamStats[GP.PhantomMatches[i].Team2].Name, tmp)$"</th><tr>");
MI = UT2K4MatchInfo(GP.getMatchInfo(GP.PhantomMatches[i].LadderId, GP.PhantomMatches[i].MatchId));
output.Logf("<tr id=\"om_"$i$"_game\"><td colspan=\"3\">"$GP.GetLadderDescription(GP.PhantomMatches[i].LadderId, GP.PhantomMatches[i].MatchId)@"in"@MI.LevelName$"</td></tr>");
output.Logf("<tr id=\"om_"$i$"_score\"><td colspan=\"3\">Score"@int(round(GP.PhantomMatches[i].ScoreTeam1))@"-"@int(round(GP.PhantomMatches[i].ScoreTeam2))$"</td></tr>");
output.Logf("<tr id=\"om_"$i$"_time\"><td colspan=\"3\">Game time"@(GP.PhantomMatches[i].GameTime/60)@"minutes</td></tr>");
}
output.Logf("</table>");
output.Logf("</div>");
}
protected function expHistory()
{
local int i;
local array<string> tmpa;
local string tmp;
if (GP.FightHistory.Length == 0) return;
output.Logf("<div id=\"d_history\" class=\"hidden\">");
output.Logf("<h1>Fight history</h1>");
for (i = 0; i < GP.FightHistory.Length; i++)
{
output.Logf("<table id=\"history_"$i$"\">");
output.Logf("<tr id=\"his_date_"$i$"\"><th colspan=\"2\">"$GP.FightHistory[i].Date[0]$"-"$Right("0"$GP.FightHistory[i].Date[1], 2)$"-"$Right("0"$GP.FightHistory[i].Date[2], 2)$" "$Right("0"$GP.FightHistory[i].Time[0], 2)$":"$Right("0"$GP.FightHistory[i].Time[1], 2)$"</th></tr>");
split(GP.FightHistory[i].MatchData, ";", tmpa);
output.Logf("<tr id=\"his_matchtype_"$i$"\"><td>"$tmpa[0]$"</td><td>"$tmpa[1]$"</td></tr>");
if (GP.FightHistory[i].MatchExtra != "") output.Logf("<tr id=\"his_matchdata_"$i$"\"><td>Additional info</td><td>"$GP.FightHistory[i].MatchExtra$"</td></tr>");
output.Logf("<tr id=\"his_gametype_"$i$"\"><td>Game type</td><td>"$getGameTypeString(GP.FightHistory[i].GameType)@"</td></tr>");
output.Logf("<tr id=\"his_level_"$i$"\"><td>Map</td><td>"$GP.FightHistory[i].Level$"</td></tr>");
output.Logf("<tr id=\"his_prize_"$i$"\"><td>Prize money</td><td>"$GP.MoneyToString(GP.FightHistory[i].PriceMoney)$"</td></tr>");
output.Logf("<tr id=\"his_balancechange_"$i$"\"><td>Balance change</td><td>"$GP.MoneyToString(GP.FightHistory[i].BalanceChange)$"</td></tr>");
output.Logf("<tr id=\"his_bonus_"$i$"\"><td>Bonus money</td><td>"$GP.MoneyToString(GP.FightHistory[i].BonusMoney)$"</td></tr>");
output.Logf("<tr id=\"his_time_"$i$"\"><td>Game time</td><td>"$(GP.FightHistory[i].GameTime/60)$" minutes</td></tr>");
output.Logf("<tr id=\"his_won_"$i$"\"><td>Won game</td><td>"$GP.FightHistory[i].WonGame$"</td></tr>");
if (GP.FightHistory[i].TeamGame)
{
output.Logf("<tr id=\"his_team1name_"$i$"\"><td>Team 1 name</td><td>"$getTeamName(GP.FightHistory[i].EnemyTeam, tmp)$"</td></tr>");
output.Logf("<tr id=\"his_team1score_"$i$"\"><td>Team 1 layout</td><td>"$GP.FightHistory[i].TeamLayout[0]$"</td></tr>");
output.Logf("<tr id=\"his_team1score_"$i$"\"><td>Team 1 score</td><td>"$GP.FightHistory[i].TeamScore[0]$"</td></tr>");
output.Logf("<tr id=\"his_team2name_"$i$"\"><td>Team 2 name</td><td>"$GP.TeamName$"</td></tr>");
output.Logf("<tr id=\"his_team2score_"$i$"\"><td>Team 2 layout</td><td>"$GP.FightHistory[i].TeamLayout[1]$"</td></tr>");
output.Logf("<tr id=\"his_team2score_"$i$"\"><td>Team 2 score</td><td>"$GP.FightHistory[i].TeamScore[1]$"</td></tr>");
}
output.Logf("<tr id=\"his_myscore_"$i$"\"><td>My score</td><td>"$GP.FightHistory[i].MyScore$"</td></tr>");
output.Logf("<tr id=\"his_mykills_"$i$"\"><td>My kills</td><td>"$GP.FightHistory[i].MyKills$"</td></tr>");
output.Logf("<tr id=\"his_mydeath_"$i$"\"><td>My deaths</td><td>"$GP.FightHistory[i].MyDeaths$"</td></tr>");
output.Logf("<tr id=\"his_myaward_"$i$"\"><td>My awards</td><td>"$GP.FightHistory[i].MyAwards$"</td></tr>");
output.Logf("<tr id=\"his_myrating_"$i$"\"><td>My rating</td><td>"$GP.FightHistory[i].MyRating$"</td></tr>");
output.Logf("</table><br />");
}
output.Logf("</div>");
}
/** return the official name of a gametype */
function string getGameTypeString(string GameType)
{
local CacheManager.GameRecord GR;
GR = class'CacheManager'.static.GetGameRecord(GameType);
if (GR.GameName != "") return GR.GameName;
return GameType;
}
/** get the real team name and the list of players */
function string getTeamName(string TeamClass, out string TeamRoster)
{
local class<UT2K4TeamRoster> ETI;
local array<string> Roster;
ETI = class<UT2K4TeamRoster>(DynamicLoadObject(TeamClass, class'Class'));
if (ETI == none)
{
Warn(TeamClass@"is not a valid UT2K4TeamRoster subclass");
return "";
}
if (!GP.GetAltTeamRoster(TeamClass, Roster))
{
Roster = ETI.default.RosterNames;
}
TeamRoster = JoinArray(Roster, ", ", true);
return ETI.default.TeamName;
}
/**
return the filename to use for the log file. The following formatting rules are accepted:
%N profile name (the actual filename)
%P player name
%Y year
%M month
%D day
%H hour
%I minute
%S second
%W day of the week
%% '%'
*/
protected function string FormatString(string LogFileName)
{
local string result;
result = LogFileName;
result = repl(result, "%Y", Right("0000"$string(Level.Year), 4));
result = repl(result, "%M", Right("00"$string(Level.Month), 2));
result = repl(result, "%D", Right("00"$string(Level.Day), 2));
result = repl(result, "%H", Right("00"$string(Level.Hour), 2));
result = repl(result, "%I", Right("00"$string(Level.Minute), 2));
result = repl(result, "%W", Right("0"$string(Level.DayOfWeek), 1));
result = repl(result, "%S", Right("00"$string(Level.Second), 2));
result = repl(result, "%%", "%");
result = repl(result, "%N", GP.PackageName);
result = repl(result, "%P", GP.PlayerName);
return result;
}
/** Join together array elements into a single string */
static final function string JoinArray(array<string> StringArray, optional string delim, optional bool bIgnoreBlanks)
{
local int i;
local string s;
if (delim == "")
delim = ",";
for (i = 0; i < StringArray.Length; i++)
{
if ((StringArray[i] != "") || (!bIgnoreBlanks))
{
if (s != "")
s $= delim;
s $= StringArray[i];
}
}
return s;
}
defaultproperties
{
FileName="%N_%Y_%M_%D_%H_%I"
FileExt="html"
}

View file

@ -0,0 +1,15 @@
//-----------------------------------------------------------
//
//-----------------------------------------------------------
class STY2AltComboButton extends STY2ComboButton;
DefaultProperties
{
KeyName="AltComboButton"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.AltComboTickBlurry'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.AltComboTickWatched'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.AltComboTickBlurry'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.AltComboTickPressed'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.AltComboTickBlurry'
}

View file

@ -0,0 +1,23 @@
// ====================================================================
// Class: XInterface.STY_ArrowLeft
// Parent: XInterface.STY_RoundButton
//
// Used in the player selection menu / circular lists
// ====================================================================
class STY2ArrowLeft extends STY2RoundButton;
defaultproperties
{
KeyName="ArrowLeft"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.arrowLeft_b'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.arrowLeft_w'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.arrowLeft_f'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.arrowLeft_p'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.arrowLeft_d'
ImgStyle(0)=ISTY_Scaled
ImgStyle(1)=ISTY_Scaled
ImgStyle(2)=ISTY_Scaled
ImgStyle(3)=ISTY_Scaled
ImgStyle(4)=ISTY_Scaled
}

View file

@ -0,0 +1,23 @@
//==============================================================================
// Created on: 09/24/2003
// Description
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class STY2ArrowLeftDbl extends STY2RoundButton;
DefaultProperties
{
KeyName="DoubleArrowLeft"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.dblarrowLeft_b'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.dblarrowLeft_w'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.dblarrowLeft_f'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.dblarrowLeft_p'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.dblarrowLeft_d'
ImgStyle(0)=ISTY_Scaled
ImgStyle(1)=ISTY_Scaled
ImgStyle(2)=ISTY_Scaled
ImgStyle(3)=ISTY_Scaled
ImgStyle(4)=ISTY_Scaled
}

View file

@ -0,0 +1,23 @@
// ====================================================================
// Class: XInterface.STY_ArrowRight
// Parent: XInterface.STY_RoundButton
//
// Used in the player selection menu / circular lists
// ====================================================================
class STY2ArrowRight extends STY2RoundButton;
defaultproperties
{
KeyName="ArrowRight"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.arrowRight_b'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.arrowRight_w'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.arrowRight_f'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.arrowRight_p'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.arrowRight_d'
ImgStyle(0)=ISTY_Scaled
ImgStyle(1)=ISTY_Scaled
ImgStyle(2)=ISTY_Scaled
ImgStyle(3)=ISTY_Scaled
ImgStyle(4)=ISTY_Scaled
}

View file

@ -0,0 +1,23 @@
//==============================================================================
// Created on: 09/24/2003
// Description
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class STY2ArrowRightDbl extends STY2RoundButton;
DefaultProperties
{
KeyName="DoubleArrowRight"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.dblarrowRight_b'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.dblarrowRight_w'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.dblarrowRight_f'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.dblarrowRight_p'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.dblarrowRight_d'
ImgStyle(0)=ISTY_Scaled
ImgStyle(1)=ISTY_Scaled
ImgStyle(2)=ISTY_Scaled
ImgStyle(3)=ISTY_Scaled
ImgStyle(4)=ISTY_Scaled
}

View file

@ -0,0 +1,20 @@
// ====================================================================
// Class: XInterface.STY_BindBox
// Parent: XInterface.STY_NoBackground
//
// <Enter a description here>
// ====================================================================
class STY2BindBox extends STY2NoBackground;
defaultproperties
{
KeyName="BindBox"
// FontColors(3)=(R=230,G=200,B=0,A=255)
RStyles(0)=MSTY_Alpha;
RStyles(1)=MSTY_Alpha;
RStyles(2)=MSTY_Alpha;
RStyles(3)=MSTY_Alpha;
RStyles(4)=MSTY_Alpha;
}

View file

@ -0,0 +1,18 @@
//==============================================================================
// Tab buttons that are on the bottom of the tab control
//
// Created by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class STY2BottomTabButton extends STY2TabButton;
DefaultProperties
{
KeyName="FlippedTabButton"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.tabs_b'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.tabs_b'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.tabs_b'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.buttonsquare_b2'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.tabs_b'
}

View file

@ -0,0 +1,29 @@
//====================================================================
// Parent: GUIStyles
// Class: GUI2K4.STY2BrowserButton
// Date: 04-11-2003
//
// This is the base style class for all Server Browser menu buttons.
// This class should be subclassed for each icon button (Back, Refresh, etc.)
// once we have the icons created. For now, it duplicates STY_ServerBrowserGridHeader
//
// Written by Ron Prestenback
// (c) 2003, Epic Games, Inc. All Rights Reserved
// ====================================================================
class STY2BrowserButton extends GUI2Styles;
defaultproperties
{
KeyName="BrowserButton"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SlantButtonBlurry'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SlantButtonWatched'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SlantButtonFocused'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SlantButtonPressed'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SlantButtonDisabled'
ImgStyle(0)=ISTY_Scaled
ImgStyle(1)=ISTY_Scaled
ImgStyle(2)=ISTY_Scaled
ImgStyle(3)=ISTY_Scaled
ImgStyle(4)=ISTY_Scaled
}

View file

@ -0,0 +1,28 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class STY2BrowserListSel extends STY2ListSelection;
defaultproperties
{
KeyName="BrowserListSelection"
FontNames(0)="UT2ServerListFont"
FontNames(1)="UT2ServerListFont"
FontNames(2)="UT2ServerListFont"
FontNames(3)="UT2ServerListFont"
FontNames(4)="UT2ServerListFont"
FontNames(5)="UT2ServerListFont"
FontNames(6)="UT2ServerListFont"
FontNames(7)="UT2ServerListFont"
FontNames(8)="UT2ServerListFont"
FontNames(9)="UT2ServerListFont"
FontNames(10)="UT2SmallFont"
FontNames(11)="UT2SmallFont"
FontNames(12)="UT2SmallFont"
FontNames(13)="UT2SmallFont"
FontNames(14)="UT2SmallFont"
}

View file

@ -0,0 +1,18 @@
// ====================================================================
// Class: GUI2K4.STY_CharButton
// Parent: GUI2K4.STY_SquareButton
//
// Background of character lists
// ====================================================================
class STY2CharButton extends GUI2Styles;
defaultproperties
{
KeyName="CharButton"
Images(0)=None
Images(1)=None
Images(2)=None
Images(3)=None
}

View file

@ -0,0 +1,21 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class STY2CheckBox extends GUI2Styles;
defaultproperties
{
KeyName="CheckBox"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.editboxblurry'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.editboxwatched'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.editboxfocused'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.editboxpressed'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.editBoxdisabled'
ImgStyle(0)=ISTY_Stretched
ImgStyle(1)=ISTY_Stretched
ImgStyle(2)=ISTY_Stretched
ImgStyle(3)=ISTY_Stretched
ImgStyle(4)=ISTY_Stretched
}

View file

@ -0,0 +1,22 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class STY2CheckBoxCheck extends GUI2Styles;
defaultproperties
{
KeyName="CheckBoxCheck"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'2k4menus.controls.checkboxball_b'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'2k4menus.controls.checkboxball_w'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'2k4menus.controls.checkboxball_f'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'2k4menus.controls.checkboxball_p'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'2k4menus.controls.checkboxball_d'
ImgStyle(0)=ISTY_Scaled
ImgStyle(1)=ISTY_Scaled
ImgStyle(2)=ISTY_Scaled
ImgStyle(3)=ISTY_Scaled
ImgStyle(4)=ISTY_Scaled
}

View file

@ -0,0 +1,15 @@
//-----------------------------------------------------------
//
//-----------------------------------------------------------
class STY2CloseButton extends GUI2Styles;
DefaultProperties
{
KeyName="CloseButton"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'2k4menus.NewControls.CloseBoxBallBlurry'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'2k4menus.NewControls.CloseBoxBallWatched'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'2k4menus.NewControls.CloseBoxBallBlurry'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'2k4menus.NewControls.CloseBoxBallPressed'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //material'2k4menus.NewControls.CloseBoxBallBlurry'
}

View file

@ -0,0 +1,21 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class STY2ComboButton extends GUI2Styles;
defaultproperties
{
KeyName="ComboButton"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.ComboTickBlurry'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.ComboTickWatched'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.ComboTickBlurry'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.ComboTickPressed'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.ComboTickBlurry'
BorderOffsets(0)=0
BorderOffsets(1)=0
BorderOffsets(2)=0
BorderOffsets(3)=0
}

View file

@ -0,0 +1,23 @@
// ====================================================================
// Class: XInterface.STY_ListBox
// Parent: XInterface.STY_SquareButton
//
// Background style for the actual combo area of the listbox
// i.e. when the menu is not expanded (I think ?)
// ====================================================================
class STY2ComboListBox extends STY2ListBox;
defaultproperties
{
KeyName="ComboListBox"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.ComboListDropdown'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.ComboListDropdown'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.ComboListDropdown'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.ComboListDropdown'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.ComboListDropdown'
BorderOffsets(0)=5
BorderOffsets(1)=3
BorderOffsets(2)=5
BorderOffsets(3)=3
}

View file

@ -0,0 +1,27 @@
//====================================================================
// Style class for GUI Context (right-click) menus
//
// Written by Ron Prestenback
// (c) 2003, Epic Games, Inc. All Rights Reserved
// ====================================================================
class STY2ContextMenu extends STY2ListBox;
DefaultProperties
{
KeyName="ContextMenu"
FontColors(0)=(R=14,G=37,B=95,A=180)
FontColors(1)=(R=44,G=108,B=203,A=255)
FontColors(2)=(R=14,G=41,B=106,A=255)
FontColors(3)=(R=14,G=41,B=106,A=255)
FontColors(4)=(R=32,G=32,B=80,A=180)
BorderOffsets[0]=10
BorderOffsets[1]=5
BorderOffsets[2]=10
BorderOffsets[3]=5
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxSquareFill_f'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxSquareFill_f'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxSquareFill_f'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxSquareFill_f'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxSquareFill_f'
}

View file

@ -0,0 +1,20 @@
//-----------------------------------------------------------
//
//-----------------------------------------------------------
class STY2CoolScroll extends GUI2Styles;
DefaultProperties
{
KeyName="CoolScroll"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.Display99'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.Display99'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.Display99'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.Display99'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControl.Display99'
BorderOffsets(0)=16
BorderOffsets(1)=32
BorderOffsets(2)=16
BorderOffsets(3)=32
}

View file

@ -0,0 +1,18 @@
//==============================================================================
// Created on: 08/04/2003
// Simple text label using dark text.
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class STY2DarkTextLabel extends STY2TextLabel;
DefaultProperties
{
KeyName="DarkTextLabel"
FontColors(0)=(R=14,G=41,B=106,A=255)
FontColors(1)=(R=14,G=41,B=106,A=255)
FontColors(2)=(R=29,G=86,B=220,A=255)
FontColors(3)=(R=14,G=41,B=106,A=255)
FontColors(4)=(R=14,G=41,B=106,A=255)
}

View file

@ -0,0 +1,24 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class STY2EditBox extends GUI2Styles;
defaultproperties
{
KeyName="EditBox"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.editboxblurry'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.editboxwatched'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.editboxfocused'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.editboxpressed'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.editBoxdisabled'
// FontColors(0)=(R=14,G=37,B=95,A=180)
// FontColors(1)=(R=44,G=108,B=203,A=255)
// FontColors(2)=(R=14,G=41,B=106,A=255)
// FontColors(3)=(R=14,G=41,B=106,A=255)
// FontColors(4)=(R=36,G=36,B=80,A=180)
BorderOffsets(0)=5
}

View file

@ -0,0 +1,25 @@
// ====================================================================
// Written by Joe Wilcox
// (c) 2002, Epic Games, Inc. All Rights Reserved
//
// Bottom bar in the primary browser GUI
// ====================================================================
class STY2Footer extends GUI2Styles;
defaultproperties
{
KeyName="Footer"
FontColors(0)=(R=255,B=255,G=255,A=255)
FontColors(1)=(R=255,B=255,G=255,A=255)
FontColors(2)=(R=255,B=255,G=255,A=255)
FontColors(3)=(R=255,B=255,G=255,A=255)
FontColors(4)=(R=255,B=255,G=255,A=255)
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.Newfooter'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.Newfooter'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.Newfooter'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.Newfooter'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.Newfooter'
}

View file

@ -0,0 +1,31 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class STY2FooterButton extends STY2TabButton;
defaultproperties
{
KeyName="FooterButton"
BorderOffsets(0)=10
BorderOffsets(1)=0
BorderOffsets(2)=10
BorderOffsets(3)=0
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.FooterButton'
// Images(1)=Material'2K4Menus.NewControls.FooterButtonWatched'
// Images(2)=Material'2K4Menus.NewControls.FooterButton'
// Images(3)=Material'2K4Menus.NewControls.FooterButtonPressed'
// Images(4)=Material'2K4Menus.NewControls.FooterButton'
// Images(0)=Material'2K4Menus.NewControls.GradientButtonBlurry'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.GradientButtonWatched'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.GradientButtonFocused'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.GradientButtonPressed'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.GradientButtonDisabled'
FontColors(0)=(R=0,G=0,B=0,A=255)
FontColors(1)=(R=255,G=255,B=255,A=255)
FontColors(2)=(R=255,G=255,B=255,A=255)
FontColors(3)=(R=255,G=255,B=255,A=255)
FontColors(4)=(R=0,G=0,B=0,A=255)
}

View file

@ -0,0 +1,46 @@
// ====================================================================
// Written by Joe Wilcox
// (c) 2002, Epic Games, Inc. All Rights Reserved
//
// Top bar in the primary browser GUI (background for tab controls)
// ====================================================================
class STY2Header extends STY2Footer;
defaultproperties
{
KeyName="Header"
FontColors(0)=(R=255,G=255,B=255,A=255)
FontColors(1)=(R=255,G=2255,B=255,A=255)
FontColors(2)=(R=255,G=255,B=255,A=255)
FontColors(3)=(R=255,G=255,B=255,A=255)
FontColors(4)=(R=133,G=133,B=133,A=255)
FontNames(0)="UT2DefaultFont"
FontNames(1)="UT2DefaultFont"
FontNames(2)="UT2DefaultFont"
FontNames(3)="UT2DefaultFont"
FontNames(4)="UT2DefaultFont"
FontNames(5)="UT2SmallHeaderFont"
FontNames(6)="UT2SmallHeaderFont"
FontNames(7)="UT2SmallHeaderFont"
FontNames(8)="UT2SmallHeaderFont"
FontNames(9)="UT2SmallHeaderFont"
FontNames(10)="UT2SmallHeaderFont"
FontNames(11)="UT2SmallHeaderFont"
FontNames(12)="UT2SmallHeaderFont"
FontNames(13)="UT2SmallHeaderFont"
FontNames(14)="UT2SmallHeaderFont"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.Newheader'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.Newheader'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.Newheader'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.Newheader'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.Newheader'
BorderOffsets(0)=0
BorderOffsets(1)=4
BorderOffsets(2)=0
BorderOffsets(3)=4
}

View file

@ -0,0 +1,23 @@
// ====================================================================
// Written by Joe Wilcox
// (c) 2002, Epic Games, Inc. All Rights Reserved
//
// IRC textboxes for typing chat text
// ====================================================================
class STY2IRCEntry extends GUI2Styles;
defaultproperties
{
KeyName="IRCEntry"
FontNames(0)="UT2IRCFont"
FontNames(1)="UT2IRCFont"
FontNames(2)="UT2IRCFont"
FontNames(3)="UT2IRCFont"
FontNames(4)="UT2IRCFont"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxSquarefill_b'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxSquarefill_w'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxSquarefill_f'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxSquarefill_p'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxSquarefill_d'
}

View file

@ -0,0 +1,45 @@
// ====================================================================
// Class: XInterface.STY_ServerBrowserGrid
//
// Scrolling log window containing the IRC chat buffer
// ====================================================================
class STY2IRCText extends GUI2Styles;
defaultproperties
{
KeyName="IRCText"
FontNames(0)="UT2IRCFont"
FontNames(1)="UT2IRCFont"
FontNames(2)="UT2IRCFont"
FontNames(3)="UT2IRCFont"
FontNames(4)="UT2IRCFont"
FontNames(5)="UT2IRCFont"
FontNames(6)="UT2IRCFont"
FontNames(7)="UT2IRCFont"
FontNames(8)="UT2IRCFont"
FontNames(9)="UT2IRCFont"
FontNames(10)="UT2IRCFont"
FontNames(11)="UT2IRCFont"
FontNames(12)="UT2IRCFont"
FontNames(13)="UT2IRCFont"
FontNames(14)="UT2IRCFont"
FontColors(0)=(R=160,G=160,B=160,A=255)
FontColors(1)=(R=160,G=160,B=160,A=255)
FontColors(2)=(R=160,G=160,B=160,A=255)
FontColors(3)=(R=160,G=160,B=160,A=255)
BorderOffsets(0)=5
BorderOffsets(1)=10
BorderOffsets(2)=5
BorderOffsets(3)=10
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editbox_d'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editbox_w'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editbox_f'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editbox_p'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editbox_d'
ImgColors(0)=(R=64,G=64,B=64,A=255)
ImgColors(1)=(R=64,G=64,B=64,A=255)
ImgColors(2)=(R=64,G=64,B=64,A=255)
ImgColors(3)=(R=64,G=64,B=64,A=255)
ImgColors(4)=(R=64,G=64,B=64,A=255)
}

View file

@ -0,0 +1,17 @@
//==============================================================================
// This style is for list items which are pending a drag-n-drop operation
//
// Created by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class STY2ItemOutline extends GUI2Styles;
DefaultProperties
{
KeyName="ItemOutline"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Menu.WhiteBorder'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Menu.WhiteBorder'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Menu.WhiteBorder'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Menu.WhiteBorder'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Menu.WhiteBorder'
}

View file

@ -0,0 +1,19 @@
class STY2LadderButton extends GUI2Styles;
defaultproperties
{
KeyName="LadderButton"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.LadderButton'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.LadderButtonOver'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.LadderButton'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.LadderButtonPressed'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.LadderButton'
FontColors(0)=(R=255,G=255,B=255,A=255)
FontColors(1)=(R=255,G=255,B=255,A=255)
FontColors(2)=(R=230,G=200,B=0,A=255)
FontColors(3)=(R=230,G=200,B=0,A=255)
BorderOffsets[0]=5
BorderOffsets[1]=5
BorderOffsets[2]=5
BorderOffsets[3]=5
}

View file

@ -0,0 +1,10 @@
class STY2LadderButtonActive extends STY2LadderButton;
defaultproperties
{
KeyName="LadderButtonActive"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.Combiner1'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.Combiner1'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.Combiner1'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.LadderButtonHiPressed'
}

View file

@ -0,0 +1,10 @@
class STY2LadderButtonHi extends STY2LadderButton;
defaultproperties
{
KeyName="LadderButtonHi"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.LadderButtonHi'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.LadderButtonHiOver'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.LadderButtonHi'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.SPMenu.LadderButtonHiPressed'
}

View file

@ -0,0 +1,41 @@
// ====================================================================
// Class: GUI2K4.STY_ListBox
// Parent: GUI2K4.STY_SquareButton
//
// Background style for the actual "list" area of a listbox
// ====================================================================
class STY2ListBox extends STY2SquareButton;
defaultproperties
{
KeyName="ListBox"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SectionHeaderBase'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SectionHeaderBase'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SectionHeaderBase'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SectionHeaderBase'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SectionHeaderBase'
ImgStyle(0)=ISTY_PartialScaled
ImgStyle(1)=ISTY_PartialScaled
ImgStyle(2)=ISTY_PartialScaled
ImgStyle(3)=ISTY_PartialScaled
ImgStyle(4)=ISTY_PartialScaled
FontNames(10)="UT2HeaderFont"
FontNames(11)="UT2HeaderFont"
FontNames(12)="UT2HeaderFont"
FontNames(13)="UT2HeaderFont"
FontNames(14)="UT2HeaderFont"
BorderOffsets(0)=3
BorderOffsets(1)=3
BorderOffsets(2)=3
BorderOffsets(3)=3
FontColors(0)=(R=255,B=0,G=195,A=255)
FontColors(1)=(R=255,B=0,G=210,A=255)
FontColors(2)=(R=255,B=255,G=255,A=255)
FontColors(3)=(R=255,B=255,G=255,A=255)
FontColors(4)=(R=192,B=192,G=192,A=255)
}

View file

@ -0,0 +1,29 @@
//==============================================================================
// Description
//
// Created by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class STY2ListHighlight extends STY2ListSelection;
DefaultProperties
{
KeyName="ListHighlight"
/* FontColors(0)=(R=255,G=255,B=203,A=255)
FontColors(1)=(R=44,G=108,B=203,A=255)
FontColors(2)=(R=44,G=108,B=203,A=255)
FontColors(3)=(R=44,G=108,B=203,A=255)
FontColors(4)=(R=44,G=108,B=203,A=255)
*/
FontBKColors(0)=(R=18,G=44,B=112,A=255)
FontBKColors(1)=(R=18,G=44,B=112,A=255)
FontBKColors(2)=(R=18,G=44,B=112,A=255)
FontBKColors(3)=(R=18,G=44,B=112,A=255)
FontBKColors(4)=(R=18,G=44,B=112,A=255)
ImgColors(0)=(R=18,G=44,B=112,A=255)
ImgColors(1)=(R=18,G=44,B=112,A=255)
ImgColors(2)=(R=18,G=44,B=112,A=255)
ImgColors(3)=(R=18,G=44,B=112,A=255)
ImgColors(4)=(R=18,G=44,B=112,A=255)
}

View file

@ -0,0 +1,44 @@
//==============================================================================
// Style for list section headers
//
// Created by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class STY2ListSectionHeader extends GUI2Styles;
DefaultProperties
{
KeyName="ListSection"
Images(0)=None
Images(1)=None
Images(2)=None
Images(3)=None
Images(4)=None
FontNames(5)="MediumFont"
FontNames(6)="MediumFont"
FontNames(7)="MediumFont"
FontNames(8)="MediumFont"
FontNames(9)="MediumFont"
FontNames(10)="UT2SmallHeaderFont"
FontNames(11)="UT2SmallHeaderFont"
FontNames(12)="UT2SmallHeaderFont"
FontNames(13)="UT2SmallHeaderFont"
FontNames(14)="UT2SmallHeaderFont"
FontBKColors(0)=(R=19,G=27,B=166,A=200)
FontBKColors(1)=(R=19,G=27,B=166,A=200)
FontBKColors(2)=(R=19,G=27,B=166,A=200)
FontBKColors(3)=(R=19,G=27,B=166,A=200)
FontBKColors(4)=(R=24,G=24,B=74,A=160)
ImgColors(0)=(R=24,G=24,B=74,A=200)
ImgColors(1)=(R=24,G=24,B=74,A=200)
ImgColors(2)=(R=24,G=24,B=74,A=200)
ImgColors(3)=(R=24,G=24,B=74,A=200)
ImgColors(4)=(R=24,G=24,B=74,A=200)
BorderOffsets(0)=5
}

View file

@ -0,0 +1,31 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class STY2ListSelection extends STY_ListSelection;
defaultproperties
{
FontColors(0)=(R=255,G=188,B=0,A=220)
FontColors(1)=(R=255,G=230,B=0,A=255)
FontColors(2)=(R=255,G=230,B=0,A=255)
FontColors(3)=(R=255,G=230,B=0,A=255)
FontColors(4)=(R=187,G=159,B=0,A=140)
FontBKColors(0)=(R=37,G=59,B=127,A=220)
FontBKColors(1)=(R=37,G=59,B=127,A=255)
FontBKColors(2)=(R=37,G=59,B=127,A=255)
FontBKColors(3)=(R=37,G=59,B=127,A=255)
FontBKColors(4)=(R=10,G=30,B=94,A=140)
ImgColors(0)=(R=37,G=59,B=127,A=220)
ImgColors(1)=(R=37,G=59,B=127,A=255)
ImgColors(2)=(R=28,G=35,B=128,A=255)
ImgColors(3)=(R=28,G=35,B=128,A=255)
ImgColors(4)=(R=10,G=30,B=94,A=140)
BorderOffsets[0]=3
BorderOffsets[1]=3
BorderOffsets[2]=3
BorderOffsets[3]=3
}

View file

@ -0,0 +1,27 @@
// ====================================================================
// Class: XInterface.STY_MidGameMenuButton
// Parent: XInterface.STY_SquareMenuButton
//
// Style for the mid-game menus
// ====================================================================
class STY2MidGameButton extends STY2SquareMenuButton;
defaultproperties
{
KeyName="MidGameButton"
FontNames(0)="UT2MidGameFont"
FontNames(1)="UT2MidGameFont"
FontNames(2)="UT2MidGameFont"
FontNames(3)="UT2MidGameFont"
FontNames(4)="UT2MidGameFont"
FontNames(5)="UT2MidGameFont"
FontNames(6)="UT2MidGameFont"
FontNames(7)="UT2MidGameFont"
FontNames(8)="UT2MidGameFont"
FontNames(9)="UT2MidGameFont"
FontNames(10)="UT2MidGameFont"
FontNames(11)="UT2MidGameFont"
FontNames(12)="UT2MidGameFont"
FontNames(13)="UT2MidGameFont"
FontNames(14)="UT2MidGameFont"
}

View file

@ -0,0 +1,51 @@
//==============================================================================
// Label used for mouse-over hints
//
// Written by Ron Prestenback
// © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================
class STY2MouseOverLabel extends GUI2Styles;
DefaultProperties
{
KeyName="MouseOver"
FontNames(0)="UT2SmallFont"
FontNames(1)="UT2SmallFont"
FontNames(2)="UT2SmallFont"
FontNames(3)="UT2SmallFont"
FontNames(4)="UT2SmallFont"
FontNames(5)="UT2SmallFont"
FontNames(6)="UT2SmallFont"
FontNames(7)="UT2SmallFont"
FontNames(8)="UT2SmallFont"
FontNames(9)="UT2SmallFont"
FontNames(10)="UT2SmallFont"
FontNames(11)="UT2SmallFont"
FontNames(12)="UT2SmallFont"
FontNames(13)="UT2SmallFont"
FontNames(14)="UT2SmallFont"
FontColors(0)=(R=64,G=64,B=80,A=255)
FontColors(1)=(R=64,G=64,B=80,A=255)
FontColors(2)=(R=64,G=64,B=80,A=255)
FontColors(3)=(R=64,G=64,B=80,A=255)
FontColors(4)=(R=64,G=64,B=80,A=255)
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxsquare_b'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxsquare_b'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxsquare_b'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxsquare_b'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.editboxsquare_d'
ImgColors(0)=(R=221,G=221,B=221,A=128)
ImgColors(1)=(R=221,G=221,B=221,A=128)
ImgColors(2)=(R=221,G=221,B=221,A=128)
ImgColors(3)=(R=221,G=221,B=221,A=128)
ImgColors(4)=(R=221,G=221,B=221,A=128)
BorderOffsets(0)=6
BorderOffsets(1)=8
BorderOffsets(2)=6
BorderOffsets(3)=6
}

View file

@ -0,0 +1,47 @@
// ====================================================================
// Class: GUI2K4.STY_NoBackground
// Parent: XInterface.GUIStyles
//
// <Enter a description here>
// ====================================================================
class STY2NoBackground extends GUI2Styles;
defaultproperties
{
KeyName="NoBackground"
RStyles(0)=MSTY_None;
RStyles(1)=MSTY_None;
RStyles(2)=MSTY_None;
RStyles(3)=MSTY_None;
RStyles(4)=MSTY_None;
// if _RO_
/*
// end if _RO_
FontColors(0)=(R=255,G=188,B=0,A=220)
FontColors(1)=(R=255,G=188,B=0,A=255)
FontColors(2)=(R=255,G=188,B=0,A=255)
FontColors(3)=(R=255,G=188,B=0,A=255)
FontColors(4)=(R=32,G=32,B=32,A=255)
// if _RO_
*/
FontColors(0)=(R=225,G=225,B=225,A=255)
FontColors(1)=(R=225,G=225,B=225,A=255)
FontColors(2)=(R=225,G=225,B=225,A=255)
FontColors(3)=(R=225,G=225,B=225,A=255)
FontColors(4)=(R=125,G=125,B=125,A=255)
// end if _RO_
BorderOffsets(0)=0
BorderOffsets(1)=0
BorderOffsets(2)=0
BorderOffsets(3)=0
FontNames(10)="UT2HeaderFont"
FontNames(11)="UT2HeaderFont"
FontNames(12)="UT2HeaderFont"
FontNames(13)="UT2HeaderFont"
FontNames(14)="UT2HeaderFont"
}

View file

@ -0,0 +1,14 @@
// ====================================================================
// Written by Joe Wilcox
// (c) 2002, Epic Games, Inc. All Rights Reserved
//
// General default page
// Used as base to establish font colors
// ====================================================================
class STY2Page extends GUI2Styles;
defaultproperties
{
KeyName="Page"
}

View file

@ -0,0 +1,15 @@
class STY2RosterButton extends GUI2Styles;
defaultproperties
{
KeyName="RosterButton"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Menu.BorderBoxD'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Menu.ButtonWatched'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Menu.BorderBoxD'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Menu.fbPlayerHighlight'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'InterfaceContent.Menu.BorderBoxD'
BorderOffsets[0]=2
BorderOffsets[1]=2
BorderOffsets[2]=2
BorderOffsets[3]=2
}

View file

@ -0,0 +1,42 @@
// ====================================================================
// Written by Joe Wilcox
// (c) 2002, Epic Games, Inc. All Rights Reserved
//
// Normal push buttons (OK, Cancel, Apply)
// ====================================================================
class STY2RoundButton extends GUI2Styles;
defaultproperties
{
KeyName="RoundButton"
/*
FontColors(0)=(R=14,G=37,B=95,A=180)
FontColors(1)=(R=44,G=108,B=203,A=255)
FontColors(2)=(R=14,G=41,B=106,A=255)
FontColors(3)=(R=14,G=41,B=106,A=255)
FontColors(4)=(R=32,G=32,B=80,A=180)
*/
FontNames(5)="UT2SmallHeaderFont"
FontNames(6)="UT2SmallHeaderFont"
FontNames(7)="UT2SmallHeaderFont"
FontNames(8)="UT2SmallHeaderFont"
FontNames(9)="UT2SmallHeaderFont"
FontNames(10)="UT2HeaderFont"
FontNames(11)="UT2HeaderFont"
FontNames(12)="UT2HeaderFont"
FontNames(13)="UT2HeaderFont"
FontNames(14)="UT2HeaderFont"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.buttonthick_b'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.buttonthick_w'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.buttonthick_f'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.buttonthick_p'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.Controls.buttonthick_d'
ImgStyle(0)=ISTY_PartialScaled
ImgStyle(1)=ISTY_PartialScaled
ImgStyle(2)=ISTY_PartialScaled
ImgStyle(3)=ISTY_PartialScaled
ImgStyle(4)=ISTY_PartialScaled
}

View file

@ -0,0 +1,18 @@
// ====================================================================
// Written by Joe Wilcox
// (c) 2002, Epic Games, Inc. All Rights Reserved
//
// Used by scrollboxes and spinners (up/down, +/-)
// ====================================================================
class STY2RoundScaledButton extends STY2RoundButton;
defaultproperties
{
KeyName="RoundScaledButton"
ImgStyle(0)=ISTY_Scaled
ImgStyle(1)=ISTY_Scaled
ImgStyle(2)=ISTY_Scaled
ImgStyle(3)=ISTY_Scaled
ImgStyle(4)=ISTY_Scaled
}

View file

@ -0,0 +1,24 @@
// ====================================================================
// Written by Joe Wilcox
// (c) 2002, Epic Games, Inc. All Rights Reserved
//
// What is looks like under the scrollgrab (ie: the % area)
// TODO: WTF ^^^^^^
// ====================================================================
class STY2ScrollZone extends GUI2Styles;
defaultproperties
{
KeyName="ScrollZone"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.NewScrollZone'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.NewScrollZone'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.NewScrollZone'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.NewScrollZone'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.NewScrollZone'
ImgStyle(0)=ISTY_Scaled;
ImgStyle(1)=ISTY_Scaled;
ImgStyle(2)=ISTY_Scaled;
ImgStyle(3)=ISTY_Scaled;
ImgStyle(4)=ISTY_Scaled;
}

View file

@ -0,0 +1,16 @@
// ====================================================================
// (C) 2002, Epic Games
// ====================================================================
class STY2SectionHeaderBar extends GUI2Styles;
defaultproperties
{
KeyName="SectionHeaderBar"
Images(0)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SectionHeaderBar'
Images(1)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SectionHeaderBarWatched'
Images(2)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SectionHeaderBarFocused'
Images(3)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SectionHeaderBarPressed'
Images(4)=Texture'InterfaceArt_tex.Menu.changeme_texture' //Material'2K4Menus.NewControls.SectionHeaderBar'
}

Some files were not shown because too many files have changed in this diff Show more