UIPanelManager Class Reference

Inheritance diagram for UIPanelManager:
IUIContainer IUIObject IEZDragDrop

List of all members.

Public Types

enum  SHOW_MODE { BringInForward, BringInBack, DismissForward, DismissBack }
enum  MENU_DIRECTION { Forwards, Backwards, Auto }

Public Member Functions

void AddChild (GameObject go)
 Reference to the parent UIView.
void RemoveChild (GameObject go)
 Removes an object as a child of the container.
void AddSubject (GameObject go)
 Adds an object as a subject of the container's transitions.
void RemoveSubject (GameObject go)
 Removes an object from being a subject of the container's transitions.
void MakeChild (GameObject go)
 Makes the specified GameObject a child of the panel manager, as well as makes it a child of the panel manager's transform.
bool MoveForward ()
 Moves the menu forward to the next panel in the sequence (determined by panel index). Automatically dismisses the currently displaying panel using the forward mode.
bool MoveBack ()
 Moves the menu back to the previous panel in the sequence (determined by panel index). Automatically dismisses the currently displaying panel using the "back" mode.
void BringIn (UIPanelBase panel, MENU_DIRECTION dir)
 Brings in the specified panel in a manner that portrays the menu moving in the specified direction. If "Auto" is specified for the direction, forward/backward is determined by comparing the index of the current panel to the one being brought up.
void BringInImmediate (UIPanelBase panel, MENU_DIRECTION dir)
 Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.
void BringIn (string panelName, MENU_DIRECTION dir)
 Brings in the specified panel in a manner that portrays the menu moving in the specified direction. If "Auto" is specified for the direction, forward/backward is determined by comparing the index of the current panel to the one being brought up.
void BringIn (UIPanelBase panel)
 Brings in the specified panel in a manner that portrays the menu moving in the direction determined by comparing the index of the current panel to the one being brought up.
void BringIn (string panelName)
 Brings in the specified panel in a manner that portrays the menu moving in the direction determined by comparing the index of the current panel to the one being brought up.
void BringIn (int panelIndex)
 Brings in the specified panel in a manner that portrays the menu moving in the direction determined by comparing the index of the current panel to the one being brought up.
void BringIn (int panelIndex, MENU_DIRECTION dir)
 Brings in the specified panel in a manner that portrays the menu moving in the specified direction. If "Auto" is specified for the direction, forward/backward is determined by comparing the index of the current panel to the one being brought up.
void BringInImmediate (string panelName, MENU_DIRECTION dir)
 Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.
void BringInImmediate (UIPanelBase panel)
 Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.
void BringInImmediate (string panelName)
 Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.
void BringInImmediate (int panelIndex)
 Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.
void BringInImmediate (int panelIndex, MENU_DIRECTION dir)
 Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.
void Dismiss (MENU_DIRECTION dir)
 Dismisses the currently showing panel, if any, in the direction specified.
void Dismiss ()
 Dismisses the currently showing panel, if any, in the direction specified.
void DismissImmediate (MENU_DIRECTION dir)
 Same as Dismiss(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding Dismiss() entry for more details.
void DismissImmediate ()
 Same as Dismiss(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding Dismiss() entry for more details.
virtual void SetInputDelegate (EZInputDelegate del)
 Sets the method to be called when input occurs (input is forwarded from OnInput()). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddInputDelegate() instead, or RemoveInputDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates.
virtual void AddInputDelegate (EZInputDelegate del)
 Adds a method to be called when input occurs (input is forwarded from OnInput()).
virtual void RemoveInputDelegate (EZInputDelegate del)
 Removes a method added with AddInputDelegate().
virtual void SetValueChangedDelegate (EZValueChangedDelegate del)
 Sets the method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddValueChangedDelegate() instead, or RemoveValueChangedDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates.
virtual void AddValueChangedDelegate (EZValueChangedDelegate del)
 Adds a method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved).
virtual void RemoveValueChangedDelegate (EZValueChangedDelegate del)
 Removes a method added with AddValueChangedDelegate().
virtual void OnInput (POINTER_INFO ptr)
 This is where input handling code should go in any derived class.
void CancelDrag ()
 Cancels any pending drag and drop operation.
void AddDragDropDelegate (EZDragDropDelegate del)
 Adds a delegate to be called with drag and drop notifications.
void RemoveDragDropDelegate (EZDragDropDelegate del)
 Removes a delegate from the list of those to be called with drag and drop notifications.
void SetDragDropDelegate (EZDragDropDelegate del)
 Sets the delegate to be called with drag and drop notifications. NOTE: This will replace any previously registered delegates.

Static Public Member Functions

static UIPanelManager Create (string name, Vector3 pos)
 Creates a GameObject and attaches this component type to it.

Public Attributes

UIPanelBase initialPanel
 The panel to show at the start of a menu sequence. This value overrides the indexing order in that the menu will begin at the initialPanel and then move from there based on index order (if using anonymous menu navigation).
bool deactivateAllButInitialAtStart = false
 When true, all but the initial panel will be disabled at start.
bool linearNavigation = false
 When true, the internal navigation logic of the manager assumes that all navigation will proceed one panel to the next in a predefined order without "skipping around". Set this to true for wizard-like menus.
bool circular = false
 When true, the panels are intended to be navigated in a circular fashion, meaning that when you advance to the next or previous panels, if the end has been reached, it wraps back to the beginning, or vice versa. This option also forces linear navigation (same as setting the lienarNavigation setting to true).
bool advancePastEnd = false
 When true, calling MoveBack() or MoveForward(), or using a control to do the same at the first panel or last panel in a series will cause the current panel to be dismissed and is replaced with nothing. This is useful for when you want, for example, to be able to press a "Next" button at the last panel of a wizard and have it dismiss the last panel to make way for something else on the screen.

Properties

static UIPanelManager instance [get]
 Accessor for the reference to the first instance of UIPanelManager. Use this if you only have one in your scene. Otherwise, you will need to refer directly to the instance you need.
UIPanelBase CurrentPanel [get]
 Returns a reference to the currently displaying panel, if any.
int TransitioningPanelCount [get]
 The number of panels presently in the process of transitioning.
virtual bool controlIsEnabled [get, set]
 Controls whether this control is in an enabled state or not. If it is not, input is not processed. This can also be used to cause a control to take on a "grayed out" appearance when disabled.
virtual bool DetargetOnDisable [get, set]
 When set to true, the control will instruct any pointers which have it as their target to de-target them. Use this if you are deactivating a control and want no input to go to it. It is strongly recommended NOT to use this feature on any control that appears in a scroll list, or else you may be unable to scroll past the edge of the list's viewable area.
object Data [get, set]
 Holds "boxed" data for the control. This can be used to associate any object or value with the control for later reference and use.
bool IsDraggable [get, set]
 Indicates whether the object can be dragged as part of a drag & drop operation.
LayerMask DropMask [get, set]
 A mask which can be used to make the object only be "droppable" on objects in a certain layer. NOTE: This mask is combined with the camera's mask.
float DragOffset [get, set]
 The distance an object being dragged and dropped should be offset toward the camera to ensure it hovers above other objects and controls in the scene.
EZAnimation.EASING_TYPE CancelDragEasing [get, set]
 The type of easing to use to animate the object back to its starting position when a drag operation is cancelled.
float CancelDragDuration [get, set]
 The duration of the easing animation when a drag and drop operation is cancelled.
bool IsDragging [get, set]
 Indicates whether the object is being dragged as part of a drag & drop operation. Setting this value to false while the object is being dragged will cause the drag and drop operation to be cancelled.
GameObject DropTarget [get, set]
 The GameObject over which the object being dragged is hovering and will attempt to be dropped if it let go.
bool DropHandled [get, set]
 In the context of a drag & drop operation, this indicates whether the drop action was handled. If this is not set to true in response to a Dropped message sent to OnEZDragDrop(), the drop will be considered to be unhandled and will result in a cancelled drop, causing the dragged object to return to its original position.

Detailed Description

UIPanelManager serves as a means to manage multiple UIPanels. UIPanels which wish to be managed by a UIPanelManager should be placed as children to the GameObject that contains the UIPanelManager. The main function of a UIPanelManager is to keep track of the "current" panel that is being displayed and to automatically bring in/dismiss panels as you choose to display another panel instead. In other words, a group of panels managed by a UIPanelManager are mutually exclusive to one another. If one panel is being shown, the others are considered to be "dismissed" and out of view. They may be out of view, but needn't necessarily be so. The central point is that only one panel per-manager is considered to be the "current" panel at any one time.


Member Enumeration Documentation

Identifies the direction in which the menu is supposed to move. Forwards or backwards.

Enumerator:
Forwards 

Move forward in the menu.

Backwards 

Move backward in the menu.

Auto 

Determine the direction of movement by comparing indices of panels. Only valid when specifying which panel to bring up.

The mode in which this panel should be shown. Use these values to tell the panel to present or dismiss itself, either "forwards" or "backwards". The meaning of this is defined by either by the type of UIPanelManager you are using, or by how you have defined the corresponding transitions.

Enumerator:
BringInForward 

Use this to show a panel in a manner that assumes the user is moving forwards in the menu.

BringInBack 

Use this to show a panel in a manner that assumes the user is moving backwards in the menu.

DismissForward 

Use this to dismiss a panel in a manner that assumes the user is moving forwards in the menu.

DismissBack 

Use this to dismiss a panel in a manner that assumes the user is forwards backwards in the menu.


Member Function Documentation

void UIPanelManager.AddChild ( GameObject  go  ) 

Reference to the parent UIView.

Adds a child to the container.

Parameters:
go GameObject to be added as a child of the container.

Implements IUIContainer.

void UIPanelManager.AddDragDropDelegate ( EZDragDropDelegate  del  ) 

Adds a delegate to be called with drag and drop notifications.

Parameters:
del The delegate to add.

Implements IEZDragDrop.

virtual void UIPanelManager.AddInputDelegate ( EZInputDelegate  del  )  [virtual]

Adds a method to be called when input occurs (input is forwarded from OnInput()).

Parameters:
del A method that conforms to the EZInputDelegate pattern.

Implements IUIObject.

void UIPanelManager.AddSubject ( GameObject  go  ) 

Adds an object as a subject of the container's transitions.

Parameters:
go GameObject that is subject to the container's transitions.

Implements IUIContainer.

virtual void UIPanelManager.AddValueChangedDelegate ( EZValueChangedDelegate  del  )  [virtual]

Adds a method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved).

Parameters:
del A method that conforms to the EZValueChangedDelegate pattern.

Implements IUIObject.

void UIPanelManager.BringIn ( int  panelIndex,
MENU_DIRECTION  dir 
)

Brings in the specified panel in a manner that portrays the menu moving in the specified direction. If "Auto" is specified for the direction, forward/backward is determined by comparing the index of the current panel to the one being brought up.

Parameters:
panelIndex Index of the panel to bring in.
dir Direction the menu should appear to be moving. If "Auto" is specified, the direction is determined by comparing the index of the current panel to the one being brought up.
void UIPanelManager.BringIn ( int  panelIndex  ) 

Brings in the specified panel in a manner that portrays the menu moving in the direction determined by comparing the index of the current panel to the one being brought up.

Parameters:
panelIndex Index of the panel.
void UIPanelManager.BringIn ( string  panelName  ) 

Brings in the specified panel in a manner that portrays the menu moving in the direction determined by comparing the index of the current panel to the one being brought up.

Parameters:
panelName Name of the panel to bring up.
void UIPanelManager.BringIn ( UIPanelBase  panel  ) 

Brings in the specified panel in a manner that portrays the menu moving in the direction determined by comparing the index of the current panel to the one being brought up.

Parameters:
panel Reference to the panel to bring up.
void UIPanelManager.BringIn ( string  panelName,
MENU_DIRECTION  dir 
)

Brings in the specified panel in a manner that portrays the menu moving in the specified direction. If "Auto" is specified for the direction, forward/backward is determined by comparing the index of the current panel to the one being brought up.

Parameters:
panelName Name of the panel to bring up.
dir Direction the menu should appear to be moving. If "Auto" is specified, the direction is determined by comparing the index of the current panel to the one being brought up.
void UIPanelManager.BringIn ( UIPanelBase  panel,
MENU_DIRECTION  dir 
)

Brings in the specified panel in a manner that portrays the menu moving in the specified direction. If "Auto" is specified for the direction, forward/backward is determined by comparing the index of the current panel to the one being brought up.

Parameters:
panel Reference to the panel to bring up.
dir Direction the menu should appear to be moving. If "Auto" is specified, the direction is determined by comparing the index of the current panel to the one being brought up.
void UIPanelManager.BringInImmediate ( int  panelIndex,
MENU_DIRECTION  dir 
)

Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.

Parameters:
panelIndex Index of the panel to bring in.
dir Direction the menu should appear to be moving. If "Auto" is specified, the direction is determined by comparing the index of the current panel to the one being brought up.
void UIPanelManager.BringInImmediate ( int  panelIndex  ) 

Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.

Parameters:
panelIndex Index of the panel.
void UIPanelManager.BringInImmediate ( string  panelName  ) 

Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.

Parameters:
panelName Name of the panel to bring up.
void UIPanelManager.BringInImmediate ( UIPanelBase  panel  ) 

Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.

Parameters:
panel Reference to the panel to bring up.
void UIPanelManager.BringInImmediate ( string  panelName,
MENU_DIRECTION  dir 
)

Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.

Parameters:
panelName Name of the panel to bring up.
dir Direction the menu should appear to be moving. If "Auto" is specified, the direction is determined by comparing the index of the current panel to the one being brought up.
void UIPanelManager.BringInImmediate ( UIPanelBase  panel,
MENU_DIRECTION  dir 
)

Same as BringIn(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding BringIn() entry for more details.

Parameters:
panel Reference to the panel to bring up.
dir Direction the menu should appear to be moving. If "Auto" is specified, the direction is determined by comparing the index of the current panel to the one being brought up.
void UIPanelManager.CancelDrag (  ) 

Cancels any pending drag and drop operation.

Implements IEZDragDrop.

static UIPanelManager UIPanelManager.Create ( string  name,
Vector3  pos 
) [static]

Creates a GameObject and attaches this component type to it.

Parameters:
name Name to give to the new GameObject.
pos Position, in world space, where the new object should be created.
Returns:
Returns a reference to the component.
void UIPanelManager.Dismiss (  ) 

Dismisses the currently showing panel, if any, in the direction specified.

void UIPanelManager.Dismiss ( MENU_DIRECTION  dir  ) 

Dismisses the currently showing panel, if any, in the direction specified.

Parameters:
dir The direction in which the panel is to be dismissed.
void UIPanelManager.DismissImmediate (  ) 

Same as Dismiss(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding Dismiss() entry for more details.

void UIPanelManager.DismissImmediate ( MENU_DIRECTION  dir  ) 

Same as Dismiss(...), but skips the panel's transition, fast-forwarding it instantly to its end state. See the corresponding Dismiss() entry for more details.

Parameters:
dir The direction in which the panel is to be dismissed.
void UIPanelManager.MakeChild ( GameObject  go  ) 

Makes the specified GameObject a child of the panel manager, as well as makes it a child of the panel manager's transform.

Parameters:
go The GameObject to be made a child of the panel manager.
bool UIPanelManager.MoveBack (  ) 

Moves the menu back to the previous panel in the sequence (determined by panel index). Automatically dismisses the currently displaying panel using the "back" mode.

Returns:
True if the there are more panels before this one. False if this is the first panel, or if the menu was already at the beginning.
bool UIPanelManager.MoveForward (  ) 

Moves the menu forward to the next panel in the sequence (determined by panel index). Automatically dismisses the currently displaying panel using the forward mode.

Returns:
True if the there are more panels after this one. False if this is the last panel, or if the menu was already at the end.
virtual void UIPanelManager.OnInput ( POINTER_INFO  ptr  )  [virtual]

This is where input handling code should go in any derived class.

Parameters:
ptr POINTER_INFO struct that contains information on the pointer that caused the event, as well as the event that occurred.

Implements IUIObject.

void UIPanelManager.RemoveChild ( GameObject  go  ) 

Removes an object as a child of the container.

Parameters:
go Object to be removed.

Implements IUIContainer.

void UIPanelManager.RemoveDragDropDelegate ( EZDragDropDelegate  del  ) 

Removes a delegate from the list of those to be called with drag and drop notifications.

Parameters:
del The delegate to add.

Implements IEZDragDrop.

virtual void UIPanelManager.RemoveInputDelegate ( EZInputDelegate  del  )  [virtual]

Removes a method added with AddInputDelegate().

Parameters:
del A method that conforms to the EZInputDelegate pattern.

Implements IUIObject.

void UIPanelManager.RemoveSubject ( GameObject  go  ) 

Removes an object from being a subject of the container's transitions.

Parameters:
go GameObject that should no longer be subject to the container's transitions.

Implements IUIContainer.

virtual void UIPanelManager.RemoveValueChangedDelegate ( EZValueChangedDelegate  del  )  [virtual]

Removes a method added with AddValueChangedDelegate().

Parameters:
del A method that conforms to the EZValueChangedDelegate pattern.

Implements IUIObject.

void UIPanelManager.SetDragDropDelegate ( EZDragDropDelegate  del  ) 

Sets the delegate to be called with drag and drop notifications. NOTE: This will replace any previously registered delegates.

Parameters:
del The delegate to add.

Implements IEZDragDrop.

virtual void UIPanelManager.SetInputDelegate ( EZInputDelegate  del  )  [virtual]

Sets the method to be called when input occurs (input is forwarded from OnInput()). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddInputDelegate() instead, or RemoveInputDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates.

Parameters:
del A method that conforms to the EZInputDelegate pattern.

Implements IUIObject.

virtual void UIPanelManager.SetValueChangedDelegate ( EZValueChangedDelegate  del  )  [virtual]

Sets the method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddValueChangedDelegate() instead, or RemoveValueChangedDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates.

Parameters:
del A method that conforms to the EZValueChangedDelegate pattern.

Implements IUIObject.


Member Data Documentation

When true, calling MoveBack() or MoveForward(), or using a control to do the same at the first panel or last panel in a series will cause the current panel to be dismissed and is replaced with nothing. This is useful for when you want, for example, to be able to press a "Next" button at the last panel of a wizard and have it dismiss the last panel to make way for something else on the screen.

When true, the panels are intended to be navigated in a circular fashion, meaning that when you advance to the next or previous panels, if the end has been reached, it wraps back to the beginning, or vice versa. This option also forces linear navigation (same as setting the lienarNavigation setting to true).

When true, all but the initial panel will be disabled at start.

The panel to show at the start of a menu sequence. This value overrides the indexing order in that the menu will begin at the initialPanel and then move from there based on index order (if using anonymous menu navigation).

When true, the internal navigation logic of the manager assumes that all navigation will proceed one panel to the next in a predefined order without "skipping around". Set this to true for wizard-like menus.


Property Documentation

float UIPanelManager.CancelDragDuration [get, set]

The duration of the easing animation when a drag and drop operation is cancelled.

Implements IEZDragDrop.

EZAnimation.EASING_TYPE UIPanelManager.CancelDragEasing [get, set]

The type of easing to use to animate the object back to its starting position when a drag operation is cancelled.

Implements IEZDragDrop.

virtual bool UIPanelManager.controlIsEnabled [get, set]

Controls whether this control is in an enabled state or not. If it is not, input is not processed. This can also be used to cause a control to take on a "grayed out" appearance when disabled.

Implements IUIObject.

UIPanelBase UIPanelManager.CurrentPanel [get]

Returns a reference to the currently displaying panel, if any.

object UIPanelManager.Data [get, set]

Holds "boxed" data for the control. This can be used to associate any object or value with the control for later reference and use.

Implements IEZDragDrop.

virtual bool UIPanelManager.DetargetOnDisable [get, set]

When set to true, the control will instruct any pointers which have it as their target to de-target them. Use this if you are deactivating a control and want no input to go to it. It is strongly recommended NOT to use this feature on any control that appears in a scroll list, or else you may be unable to scroll past the edge of the list's viewable area.

Implements IUIObject.

float UIPanelManager.DragOffset [get, set]

The distance an object being dragged and dropped should be offset toward the camera to ensure it hovers above other objects and controls in the scene.

Implements IEZDragDrop.

bool UIPanelManager.DropHandled [get, set]

In the context of a drag & drop operation, this indicates whether the drop action was handled. If this is not set to true in response to a Dropped message sent to OnEZDragDrop(), the drop will be considered to be unhandled and will result in a cancelled drop, causing the dragged object to return to its original position.

Implements IEZDragDrop.

LayerMask UIPanelManager.DropMask [get, set]

A mask which can be used to make the object only be "droppable" on objects in a certain layer. NOTE: This mask is combined with the camera's mask.

Implements IEZDragDrop.

GameObject UIPanelManager.DropTarget [get, set]

The GameObject over which the object being dragged is hovering and will attempt to be dropped if it let go.

Implements IEZDragDrop.

UIPanelManager UIPanelManager.instance [static, get]

Accessor for the reference to the first instance of UIPanelManager. Use this if you only have one in your scene. Otherwise, you will need to refer directly to the instance you need.

bool UIPanelManager.IsDraggable [get, set]

Indicates whether the object can be dragged as part of a drag & drop operation.

Implements IEZDragDrop.

bool UIPanelManager.IsDragging [get, set]

Indicates whether the object is being dragged as part of a drag & drop operation. Setting this value to false while the object is being dragged will cause the drag and drop operation to be cancelled.

Implements IEZDragDrop.

int UIPanelManager.TransitioningPanelCount [get]

The number of panels presently in the process of transitioning.


The documentation for this class was generated from the following file:

Generated on Thu Sep 8 16:31:19 2011 for EZ GUI by  doxygen 1.6.1