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

UTGame.GFxUDKFrontEnd_View


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
/**********************************************************************

Filename    :   GFxUDKFrontEnd_View.uc
Content     :   GFx UDK Front End Implementaiton

Copyright   :   (c) 2010 Scaleform Corp. All Rights Reserved.

Notes       :   Base class for any view (Screen/View) within the GFxUDK 
                front end menu. 

Licensees may use this file in accordance with the valid Scaleform
Commercial License Agreement provided with the software.

This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING 
THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR ANY PURPOSE.

**********************************************************************/
class GFxUDKFrontEnd_View extends GFxUIView
    dependsOn(Settings);

/** Reference to the manager which drives the front end. */
var GFxUDKFrontEnd MenuManager;

/** A unique name for this view which can be used to discern it from others. */
var name ViewName;

/** @todo sf Remove this placeholder when C++ logic GetPlayerIndex() has been implemented.*/
const FakePlayerIndex = 0;

/** Configures the view when it is first loaded. */
function OnViewLoaded();

/** 
 *  Update the view.  
 *  Called whenever the view becomes the topmost view on the view stack. 
 */
function OnTopMostView(optional bool bPlayOpenAnimation = false)
{
	DisableSubComponents(false);  
    
	if (bPlayOpenAnimation)
    {        
        PlayOpenAnimation();
    }       

    if (MenuManager != none)
    {
        MenuManager.SetEscapeDelegate(none);
        MenuManager.SetEscapeDelegate(OnEscapeKeyPress);   
    }  
}

/** Fired when a view is pushed on to the stack. */
function OnViewActivated();

/** Fired when a view is popped from the stack. */
function OnViewClosed()
{
    DisableSubComponents(true);
}

/** 
 *  Enable/disable sub-components of the view. 
 *  Because almost everything in the menu takes focus on rollOver, this is necessary to avoid 
 *  undesirable focus changes when screens are tweened in and out. This could and should be replaced
 *  using a proper ActionScript extension once one is implemented.
 */
function DisableSubComponents(bool bDisableComponents);

/** Plays the view's open animation. */
function PlayOpenAnimation();

/** Plays the view's close animation. */
function PlayCloseAnimation();

/**
 * User has selected "Back". Pop a view and move on.
 */
function Select_Back(GFxClikWidget.EventData ev)
{
    MoveBackImpl();
}

/** Moves the user backward on the view stack by popping the topmost view / dialog. */
function MoveBackImpl()
{
    if (MenuManager != none)
    {
        PlayCloseAnimation();
        MenuManager.PopView();        
    }
}

/** This method is tied to Escape / Back user input. Can be overriden by sub-classes for custom behavior per view. */
function OnEscapeKeyPress()
{
    MoveBackImpl(); 
}

/** Callback when a CLIK widget with enableInitCallback set to TRUE is initialized.  Returns TRUE if the widget was handled, FALSE if not. */
event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget) 
{
    return false;
}

defaultproperties
{
    
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: sö 25-7-2010 18:06:42.000 - Creation time: ti 22-3-2011 19:57:06.821 - Created with UnCodeX