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

Engine.UIAction_ReplacePage


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
/**
 * Replaces a tab page with a different tab page.
 *
 * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved
 */
class UIAction_ReplacePage extends UIAction_TabControl;

/** the class to use for the new page class */
var()	class<UITabPage>	TabPageClass;

/** reference to the page that should be removed */
var		UITabPage			PageToRemove;

/**
 * Specifies whether the page should also be given focus once it's successfully added to the tab control.
 */
var()	bool				bFocusPage;

/**
 * Reference to an existing page instance.  If non-NULL, this page will be inserted rather than creating a new one.
 */
var		UITabPage			PageToInsert;

/**
 * Optional UIPrefab to use as the template for the new page.  If specified, this will be used instead of the value of TabPageClass.
 */
var		UITabPage			PagePrefab;

/* == Events == */
/**
 * Called when this event is activated.  Performs the logic for this action.
 */
event Activated()
{
	local bool bSuccess;
	local UITabPage NewPage;
	local SeqVar_Object ObjVar;

	Super.Activated();

	if ( (TabControl != None && PageToRemove != None)
	&&	(TabPageClass != None || PageToInsert != None) )
	{
		NewPage = PageToInsert;
		if ( NewPage == None )
		{
			// if we're using a prefab, we must use the same class as the prefab as well
			if ( PagePrefab != None )
			{
				TabPageClass = PagePrefab.Class;
			}

			NewPage = TabControl.CreateTabPage( TabPageClass, PagePrefab );
		}

		if ( NewPage != None )
		{
			bSuccess = TabControl.ReplacePage(PageToRemove, NewPage, PlayerIndex, bFocusPage);

			foreach LinkedVariables( class'SeqVar_Object', ObjVar, "New Page" )
			{
				ObjVar.SetObjectValue(NewPage);
			}
		}
	}

	if ( bSuccess )
	{
		if ( !OutputLinks[0].bDisabled )
		{
			OutputLinks[0].bHasImpulse = true;
		}
	}
	else
	{
		if ( !OutputLinks[1].bDisabled )
		{
			OutputLinks[1].bHasImpulse = true;
		}
	}
}

defaultproperties
{
   TabPageClass=Class'Engine.UITabPage'
   bFocusPage=True
   VariableLinks(3)=(ExpectedType=Class'Engine.SeqVar_Object',LinkDesc="Page To Remove",PropertyName="PageToRemove",MinVars=1,MaxVars=255)
   VariableLinks(4)=(ExpectedType=Class'Engine.SeqVar_Object',LinkDesc="Page To Insert",PropertyName="PageToInsert",bHidden=True,MinVars=1,MaxVars=255)
   VariableLinks(5)=(ExpectedType=Class'Engine.SeqVar_Object',LinkDesc="Page Prefab",PropertyName="PagePrefab",bHidden=True,MinVars=1,MaxVars=255)
   VariableLinks(6)=(ExpectedType=Class'Engine.SeqVar_Object',LinkDesc="New Page",bWriteable=True,MinVars=1,MaxVars=255)
   ObjName="Replace Page"
   Name="Default__UIAction_ReplacePage"
   ObjectArchetype=UIAction_TabControl'Engine.Default__UIAction_TabControl'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:18:32.000 - Creation time: sk 18-3-2018 10:01:16.296 - Created with UnCodeX