PixelCrushers.UIPanel Class Reference

Manages a UI panel. More...

Inheritance diagram for PixelCrushers.UIPanel:
Collaboration diagram for PixelCrushers.UIPanel:

Public Types

enum  StartState { GameObjectState , Open , Closed }
 
enum  PanelState {
  Uninitialized , Opening , Open , Closing ,
  Closed
}
 

Public Member Functions

void RefreshSelectablesList ()
 
void RefreshAfterOneFrame ()
 
void TakeFocus ()
 Move this panel to the top of the stack.
 
virtual void Open ()
 
virtual void Close ()
 
virtual void SetOpen (bool value)
 
virtual void Toggle ()
 
virtual void SetFocus (GameObject selectable)
 
virtual void CheckFocus ()
 

Public Attributes

GameObject firstSelected
 
float focusCheckFrequency = 0.2f
 
float refreshSelectablesFrequency = 0
 
bool selectPreviousOnDisable = true
 
string showAnimationTrigger = "Show"
 
string hideAnimationTrigger = "Hide"
 
StartState startState = StartState.GameObjectState
 
bool waitForShowAnimationToSetOpen = false
 
UnityEvent onOpen = new UnityEvent()
 
UnityEvent onClose = new UnityEvent()
 
UnityEvent onClosed = new UnityEvent()
 
UnityEvent onBackButtonDown = new UnityEvent()
 

Static Public Attributes

static bool monitorSelection = true
 If false, turns off checking of current selection to make sure a valid selectable is selected.
 

Protected Member Functions

virtual void Start ()
 
void PushToPanelStack ()
 
void PopFromPanelStack ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void OnVisible ()
 
virtual void OnHidden ()
 
virtual void Update ()
 
GameObject GetFirstInteractableButton ()
 

Protected Attributes

bool m_deactivateOnHidden = true
 
GameObject m_previousSelected = null
 
GameObject m_lastSelected = null
 
List< GameObject > selectables = new List<GameObject>()
 

Static Protected Attributes

static List< UIPanelpanelStack = new List<UIPanel>()
 

Properties

bool deactivateOnHidden [get, set]
 
static UIPanel topPanel [get]
 
PanelState panelState [get, set]
 
virtual bool waitForShowAnimation [get, set]
 
bool isOpen [get]
 
UIAnimatorMonitor animatorMonitor [get]
 
UnityEngine.EventSystems.EventSystem eventSystem [get, set]
 
- Properties inherited from PixelCrushers.IEventSystemUser

Detailed Description

Manages a UI panel.

When the panel is active and on top, it ensures that one of its Selectables is selected if using joystick or keyboard.

Member Enumeration Documentation

◆ PanelState

Enumerator
Uninitialized 
Opening 
Open 
Closing 
Closed 

◆ StartState

Enumerator
GameObjectState 
Open 
Closed 

Member Function Documentation

◆ CheckFocus()

virtual void PixelCrushers.UIPanel.CheckFocus ( )
inlinevirtual

◆ Close()

virtual void PixelCrushers.UIPanel.Close ( )
inlinevirtual

◆ GetFirstInteractableButton()

GameObject PixelCrushers.UIPanel.GetFirstInteractableButton ( )
inlineprotected

◆ OnDisable()

virtual void PixelCrushers.UIPanel.OnDisable ( )
inlineprotectedvirtual

◆ OnEnable()

virtual void PixelCrushers.UIPanel.OnEnable ( )
inlineprotectedvirtual

◆ OnHidden()

virtual void PixelCrushers.UIPanel.OnHidden ( )
inlineprotectedvirtual

◆ OnVisible()

virtual void PixelCrushers.UIPanel.OnVisible ( )
inlineprotectedvirtual

◆ Open()

virtual void PixelCrushers.UIPanel.Open ( )
inlinevirtual

◆ PopFromPanelStack()

void PixelCrushers.UIPanel.PopFromPanelStack ( )
inlineprotected

◆ PushToPanelStack()

void PixelCrushers.UIPanel.PushToPanelStack ( )
inlineprotected

◆ RefreshAfterOneFrame()

void PixelCrushers.UIPanel.RefreshAfterOneFrame ( )
inline

◆ RefreshSelectablesList()

void PixelCrushers.UIPanel.RefreshSelectablesList ( )
inline

◆ SetFocus()

virtual void PixelCrushers.UIPanel.SetFocus ( GameObject  selectable)
inlinevirtual

◆ SetOpen()

virtual void PixelCrushers.UIPanel.SetOpen ( bool  value)
inlinevirtual

◆ Start()

virtual void PixelCrushers.UIPanel.Start ( )
inlineprotectedvirtual

◆ TakeFocus()

void PixelCrushers.UIPanel.TakeFocus ( )
inline

Move this panel to the top of the stack.

◆ Toggle()

virtual void PixelCrushers.UIPanel.Toggle ( )
inlinevirtual

◆ Update()

virtual void PixelCrushers.UIPanel.Update ( )
inlineprotectedvirtual

Member Data Documentation

◆ firstSelected

GameObject PixelCrushers.UIPanel.firstSelected

◆ focusCheckFrequency

float PixelCrushers.UIPanel.focusCheckFrequency = 0.2f

◆ hideAnimationTrigger

string PixelCrushers.UIPanel.hideAnimationTrigger = "Hide"

◆ m_deactivateOnHidden

bool PixelCrushers.UIPanel.m_deactivateOnHidden = true
protected

◆ m_lastSelected

GameObject PixelCrushers.UIPanel.m_lastSelected = null
protected

◆ m_previousSelected

GameObject PixelCrushers.UIPanel.m_previousSelected = null
protected

◆ monitorSelection

bool PixelCrushers.UIPanel.monitorSelection = true
static

If false, turns off checking of current selection to make sure a valid selectable is selected.

You can temporarily set this false if you open a non-UIPanel window and don't want any UIPanels to steal focus.

◆ onBackButtonDown

UnityEvent PixelCrushers.UIPanel.onBackButtonDown = new UnityEvent()

◆ onClose

UnityEvent PixelCrushers.UIPanel.onClose = new UnityEvent()

◆ onClosed

UnityEvent PixelCrushers.UIPanel.onClosed = new UnityEvent()

◆ onOpen

UnityEvent PixelCrushers.UIPanel.onOpen = new UnityEvent()

◆ panelStack

List<UIPanel> PixelCrushers.UIPanel.panelStack = new List<UIPanel>()
staticprotected

◆ refreshSelectablesFrequency

float PixelCrushers.UIPanel.refreshSelectablesFrequency = 0

◆ selectables

List<GameObject> PixelCrushers.UIPanel.selectables = new List<GameObject>()
protected

◆ selectPreviousOnDisable

bool PixelCrushers.UIPanel.selectPreviousOnDisable = true

◆ showAnimationTrigger

string PixelCrushers.UIPanel.showAnimationTrigger = "Show"

◆ startState

StartState PixelCrushers.UIPanel.startState = StartState.GameObjectState

◆ waitForShowAnimationToSetOpen

bool PixelCrushers.UIPanel.waitForShowAnimationToSetOpen = false

Property Documentation

◆ animatorMonitor

UIAnimatorMonitor PixelCrushers.UIPanel.animatorMonitor
get

◆ deactivateOnHidden

bool PixelCrushers.UIPanel.deactivateOnHidden
getset

◆ eventSystem

UnityEngine.EventSystems.EventSystem PixelCrushers.UIPanel.eventSystem
getset

◆ isOpen

bool PixelCrushers.UIPanel.isOpen
get

◆ panelState

PanelState PixelCrushers.UIPanel.panelState
getset

◆ topPanel

UIPanel PixelCrushers.UIPanel.topPanel
staticgetprotected

◆ waitForShowAnimation

virtual bool PixelCrushers.UIPanel.waitForShowAnimation
getset

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