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

GUI2K4.SimpleFilterPage


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
//==============================================================================
//	Description
//
//	Written by Ron Prestenback
//	© 2003, Epic Games, Inc.  All Rights Reserved
//==============================================================================
class SimpleFilterPage extends FilterPageBase;

var SimpleFilterPanel					p_Simple;

event Opened(GUIComponent Sender)
{
	Super.Opened(Sender);

	p_Simple = SimpleFilterPanel(sp_Filter.Panels[0]);
	p_Simple.FilterMaster = FM;
	p_Simple.FilterSelectionChanged(False);

	cp_Filter.RemoveComponent(cp_Filter.co_GameType);
}

function SaveFilters()
{
	local int i, j;

	for (i = 0; i < FM.AllFilters.Length; i++)
	{
		for (j = 0; j < FM.AllFilters[i].Count(); j++)
		{
			if ( FM.AllFilters[i].GetRuleQueryType(j) == "QT_Disabled" )
				FM.AllFilters[i].RemoveRuleAt(j--);
		}
	}

	Super.SaveFilters();
}

function ApplyRules(int FilterIndex, optional bool bRefresh)
{
//	log("ApplyRules FilterIndex:"$FilterIndex@"bRefresh:"$bRefresh);
	if (FilterIndex >= 0)
	{
		FM.LoadSettings( FilterIndex );
		if (FilterIndex < FM.AllFilters.Length)
		{
			p_Simple.FilterSelectionChanged(True);
			p_Simple.Refresh(FilterIndex);
		}
	}

	else if (p_Simple != None)
		p_Simple.FilterSelectionChanged(False);
}

function InitFilterList()
{
	Super.InitFilterList();

	if (p_Simple != None)
		p_Simple.Refresh(-1);
}

function bool CreateTemplateRule( out GameInfo.KeyValuePair Rule, out string QueryType, out string RuleType )
{
	if ( Rule.Key ~= "TimeLimit" || Rule.Key ~= "GoalScore" )
		return false;

	if ( Rule.Key ~= "gamestats" )
		Rule.Key = "stats";

	else if ( Rule.Key ~= "translocator" )
		Rule.Key = "transloc";

	else if ( Rule.Key ~= "GamePassword" )
		Rule.Key = "password";

	else if ( Rule.Key ~= "MinPlayers" )
	{
		if ( Rule.Value ~= "0" )
		{
			Rule.Key = "nobots";
			Rule.Value = "true";
		}

		else
		{
			QueryType = "QT_GreaterThanEquals";
			RuleType = "DT_Unique";
			return true;
		}
	}

	else if ( Rule.Key ~= "ServerVersion" )
	{
		Rule.Key = "custom";
		Rule.Value = "version="$Rule.Value;
	}

	return Super.CreateTemplateRule(Rule, QueryType, RuleType);
}

defaultproperties
{
     Begin Object Class=GUISplitter Name=FilterSplitter
         SplitOrientation=SPLIT_Horizontal
         SplitPosition=0.609100
         bFixedSplitter=True
         bDrawSplitter=False
         DefaultPanels(0)="GUI2K4.SimpleFilterPanel"
         DefaultPanels(1)="GUI2K4.UT2K4FilterControlPanel"
         OnCreateComponent=SimpleFilterPage.InternalOnCreateComponent
         IniOption="@Internal"
         WinTop=0.033593
         WinLeft=0.009812
         WinWidth=0.976014
         WinHeight=0.936763
         RenderWeight=1.000000
         bBoundToParent=True
         bScaleToParent=True
     End Object
     sp_Filter=GUISplitter'GUI2K4.SimpleFilterPage.FilterSplitter'

}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: pr 5-2-2018 12:35:54.000 - Creation time: sk 18-3-2018 09:50:18.630 - Created with UnCodeX