C# Class UIPanelManager, urban-survivors

Inheritance: MonoBehaviour
Show file Open project: exdev/urban-survivors Class Usage Examples

Public Properties

Property Type Description
advancePastEnd bool
circular bool
deactivateAllButInitialAtStart bool
defaultPanel UIPanelBase,
initialPanel UIPanelBase,
linearNavigation bool

Protected Properties

Property Type Description
breadcrumbs List
changeDelegate EZValueChangedDelegate
container IUIContainer
curPanel UIPanelBase,
inputDelegate EZInputDelegate
m_controlIsEnabled bool
m_instance UIPanelManager,
panels List

Public Methods

Method Description
AddChild ( GameObject go ) : void
AddInputDelegate ( EZInputDelegate del ) : void
AddSubject ( GameObject go ) : void
AddValueChangedDelegate ( EZValueChangedDelegate del ) : void
Awake ( ) : void
BringIn ( UIPanelBase, panel ) : void

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.

BringIn ( UIPanelBase, panel, MENU_DIRECTION dir ) : void

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.

BringIn ( int panelIndex ) : void

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.

BringIn ( int panelIndex, MENU_DIRECTION dir ) : void

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.

BringIn ( string panelName ) : void

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.

BringIn ( string panelName, MENU_DIRECTION dir ) : void

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.

BringInImmediate ( UIPanelBase, panel ) : void

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.

BringInImmediate ( UIPanelBase, panel, MENU_DIRECTION dir ) : void

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.

BringInImmediate ( int panelIndex ) : void

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.

BringInImmediate ( int panelIndex, MENU_DIRECTION dir ) : void

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.

BringInImmediate ( string panelName ) : void

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.

BringInImmediate ( string panelName, MENU_DIRECTION dir ) : void

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.

Create ( string name, Vector3 pos ) : UIPanelManager,

Creates a GameObject and attaches this component type to it.

Dismiss ( ) : void

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

Dismiss ( MENU_DIRECTION dir ) : void

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

DismissImmediate ( ) : void

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.

DismissImmediate ( MENU_DIRECTION dir ) : void

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.

GotFocus ( ) : bool
MakeChild ( GameObject go ) : void

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

MoveBack ( ) : bool

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.

MoveForward ( ) : bool

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.

OnInput ( POINTER_INFO, ptr ) : void
RemoveChild ( GameObject go ) : void
RemoveInputDelegate ( EZInputDelegate del ) : void
RemoveSubject ( GameObject go ) : void
RemoveValueChangedDelegate ( EZValueChangedDelegate del ) : void
RequestContainership ( IUIContainer cont ) : bool
ScanChildren ( ) : void
SetInputDelegate ( EZInputDelegate del ) : void
SetLayerRecursively ( GameObject go, int layer ) : void
SetValueChangedDelegate ( EZValueChangedDelegate del ) : void

Private Methods

Method Description
Start ( ) : IEnumerator

Method Details

AddChild() public method

public AddChild ( GameObject go ) : void
go GameObject
return void

AddInputDelegate() public method

public AddInputDelegate ( EZInputDelegate del ) : void
del EZInputDelegate
return void

AddSubject() public method

public AddSubject ( GameObject go ) : void
go GameObject
return void

AddValueChangedDelegate() public method

public AddValueChangedDelegate ( EZValueChangedDelegate del ) : void
del EZValueChangedDelegate
return void

Awake() public method

public Awake ( ) : void
return void

BringIn() public method

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.
public BringIn ( UIPanelBase, panel ) : void
panel UIPanelBase, Reference to the panel to bring up.
return void

BringIn() public method

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.
public BringIn ( UIPanelBase, panel, MENU_DIRECTION dir ) : void
panel UIPanelBase, Reference to the panel to bring up.
dir MENU_DIRECTION 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.
return void

BringIn() public method

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.
public BringIn ( int panelIndex ) : void
panelIndex int Index of the panel.
return void

BringIn() public method

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.
public BringIn ( int panelIndex, MENU_DIRECTION dir ) : void
panelIndex int Index of the panel to bring in.
dir MENU_DIRECTION 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.
return void

BringIn() public method

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.
public BringIn ( string panelName ) : void
panelName string Name of the panel to bring up.
return void

BringIn() public method

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.
public BringIn ( string panelName, MENU_DIRECTION dir ) : void
panelName string Name of the panel to bring up.
dir MENU_DIRECTION 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.
return void

BringInImmediate() public method

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.
public BringInImmediate ( UIPanelBase, panel ) : void
panel UIPanelBase, Reference to the panel to bring up.
return void

BringInImmediate() public method

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.
public BringInImmediate ( UIPanelBase, panel, MENU_DIRECTION dir ) : void
panel UIPanelBase, Reference to the panel to bring up.
dir MENU_DIRECTION 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.
return void

BringInImmediate() public method

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.
public BringInImmediate ( int panelIndex ) : void
panelIndex int Index of the panel.
return void

BringInImmediate() public method

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.
public BringInImmediate ( int panelIndex, MENU_DIRECTION dir ) : void
panelIndex int Index of the panel to bring in.
dir MENU_DIRECTION 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.
return void

BringInImmediate() public method

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.
public BringInImmediate ( string panelName ) : void
panelName string Name of the panel to bring up.
return void

BringInImmediate() public method

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.
public BringInImmediate ( string panelName, MENU_DIRECTION dir ) : void
panelName string Name of the panel to bring up.
dir MENU_DIRECTION 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.
return void

Create() static public method

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos ) : UIPanelManager,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
return UIPanelManager,

Dismiss() public method

Dismisses the currently showing panel, if any, in the direction specified.
public Dismiss ( ) : void
return void

Dismiss() public method

Dismisses the currently showing panel, if any, in the direction specified.
public Dismiss ( MENU_DIRECTION dir ) : void
dir MENU_DIRECTION The direction in which the panel is to be dismissed.
return void

DismissImmediate() public method

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.
public DismissImmediate ( ) : void
return void

DismissImmediate() public method

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.
public DismissImmediate ( MENU_DIRECTION dir ) : void
dir MENU_DIRECTION The direction in which the panel is to be dismissed.
return void

GotFocus() public method

public GotFocus ( ) : bool
return bool

MakeChild() public method

Makes the specified GameObject a child of the panel manager, as well as makes it a child of the panel manager's transform.
public MakeChild ( GameObject go ) : void
go GameObject The GameObject to be made a child of the panel manager.
return void

MoveBack() public method

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.
public MoveBack ( ) : bool
return bool

MoveForward() public method

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.
public MoveForward ( ) : bool
return bool

OnInput() public method

public OnInput ( POINTER_INFO, ptr ) : void
ptr POINTER_INFO,
return void

RemoveChild() public method

public RemoveChild ( GameObject go ) : void
go GameObject
return void

RemoveInputDelegate() public method

public RemoveInputDelegate ( EZInputDelegate del ) : void
del EZInputDelegate
return void

RemoveSubject() public method

public RemoveSubject ( GameObject go ) : void
go GameObject
return void

RemoveValueChangedDelegate() public method

public RemoveValueChangedDelegate ( EZValueChangedDelegate del ) : void
del EZValueChangedDelegate
return void

RequestContainership() public method

public RequestContainership ( IUIContainer cont ) : bool
cont IUIContainer
return bool

ScanChildren() public method

public ScanChildren ( ) : void
return void

SetInputDelegate() public method

public SetInputDelegate ( EZInputDelegate del ) : void
del EZInputDelegate
return void

SetLayerRecursively() public static method

public static SetLayerRecursively ( GameObject go, int layer ) : void
go GameObject
layer int
return void

SetValueChangedDelegate() public method

public SetValueChangedDelegate ( EZValueChangedDelegate del ) : void
del EZValueChangedDelegate
return void

Property Details

advancePastEnd public property

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.
public bool advancePastEnd
return bool

breadcrumbs protected property

protected List breadcrumbs
return List

changeDelegate protected property

protected EZValueChangedDelegate changeDelegate
return EZValueChangedDelegate

circular public property

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).
public bool circular
return bool

container protected property

protected IUIContainer container
return IUIContainer

curPanel protected property

protected UIPanelBase, curPanel
return UIPanelBase,

deactivateAllButInitialAtStart public property

When true, all but the initial panel will be disabled at start.
public bool deactivateAllButInitialAtStart
return bool

defaultPanel public property

Deprecated. Use initialPanel instead.
public UIPanelBase, defaultPanel
return UIPanelBase,

initialPanel public property

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).
public UIPanelBase, initialPanel
return UIPanelBase,

inputDelegate protected property

protected EZInputDelegate inputDelegate
return EZInputDelegate

linearNavigation public property

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.
public bool linearNavigation
return bool

m_controlIsEnabled protected property

protected bool m_controlIsEnabled
return bool

m_instance protected static property

protected static UIPanelManager, m_instance
return UIPanelManager,

panels protected property

protected List panels
return List