PixelCrushers.DialogueSystem.StandardUIMenuPanel Class Reference
Inheritance diagram for PixelCrushers.DialogueSystem.StandardUIMenuPanel:
Collaboration diagram for PixelCrushers.DialogueSystem.StandardUIMenuPanel:

Public Member Functions

virtual void Awake ()
 
override void CheckFocus ()
 
virtual void SetPCPortrait (Sprite portraitSprite, string portraitName)
 
virtual void SetPCPortrait (Texture2D portraitTexture, string portraitName)
 
virtual void ShowResponses (Subtitle subtitle, Response[] responses, Transform target)
 
virtual void HideResponses ()
 
override void Close ()
 
virtual void Focus ()
 
virtual void Unfocus ()
 
virtual void HideImmediate ()
 
virtual void SetupTemplateButtonNavigation (bool hasDisabledButton)
 
void DestroyInstantiatedButtons ()
 
virtual void MakeButtonsNonclickable ()
 Makes the panel's buttons non-clickable.
 
virtual void StartTimer (float timeout, System.Action timeoutHandler)
 Starts the timer.
 
virtual void StopTimer ()
 
- Public Member Functions inherited from PixelCrushers.UIPanel
void RefreshSelectablesList ()
 
void RefreshAfterOneFrame ()
 
void TakeFocus ()
 Move this panel to the top of the stack.
 
virtual void Open ()
 
virtual void SetOpen (bool value)
 
virtual void Toggle ()
 
virtual void SetFocus (GameObject selectable)
 

Public Attributes

UnityEngine.UI.Graphic panel
 
UnityEngine.UI.Image pcImage
 
UITextField pcName
 
bool usePortraitNativeSize = false
 
UnityEngine.UI.Slider timerSlider
 
ResponseButtonAlignment buttonAlignment = ResponseButtonAlignment.ToFirst
 
bool showUnusedButtons = false
 
StandardUIResponseButton[] buttons
 
StandardUIResponseButton buttonTemplate
 
UnityEngine.UI.Graphic buttonTemplateHolder
 
UnityEngine.UI.Scrollbar buttonTemplateScrollbar
 
UIScrollbarEnabler scrollbarEnabler
 
float buttonTemplateScrollbarResetValue = 1
 
bool explicitNavigationForTemplateButtons = true
 
bool loopExplicitNavigation = false
 
UIAutonumberSettings autonumber = new UIAutonumberSettings()
 
float blockInputDuration = 0
 
bool showSelectionWhileInputBlocked = false
 
bool warnOnEmptyResponseText = false
 
UnityEvent onContentChanged = new UnityEvent()
 
string focusAnimationTrigger = string.Empty
 
string unfocusAnimationTrigger = string.Empty
 
bool waitForClose = false
 
UnityEvent onFocus = new UnityEvent()
 Invoked when the subtitle panel gains focus.
 
UnityEvent onUnfocus = new UnityEvent()
 Invoked when the subtitle panel loses focus.
 
- Public Attributes inherited from PixelCrushers.UIPanel
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()
 

Protected Member Functions

override void Update ()
 
virtual void ShowResponsesNow (Subtitle subtitle, Response[] responses, Transform target)
 
virtual IEnumerator ShowAfterPanelsClose (Subtitle subtitle, Response[] responses, Transform target)
 
IEnumerator FocusWhenOpen ()
 
virtual void FocusNow ()
 
void ActivateUIElements ()
 
void DeactivateUIElements ()
 
virtual void SetUIElementsActive (bool value)
 
virtual void ClearResponseButtons ()
 
virtual void SetResponseButtons (Response[] responses, Transform target)
 Sets the response buttons.
 
virtual void CheckScrollbar ()
 
IEnumerator CheckScrollbarCoroutine ()
 
virtual void SetResponseButton (StandardUIResponseButton button, Response response, Transform target, int buttonNumber)
 
int GetNextAvailableResponseButtonPosition (int start, int direction)
 
virtual GameObject InstantiateButton ()
 
void NotifyContentChanged ()
 
void DisableInput ()
 
void EnableInput ()
 
void SetInput (bool value)
 
- Protected Member Functions inherited from PixelCrushers.UIPanel
virtual void Start ()
 
void PushToPanelStack ()
 
void PopFromPanelStack ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void OnVisible ()
 
virtual void OnHidden ()
 
GameObject GetFirstInteractableButton ()
 

Protected Attributes

StandardUITimer m_timer = null
 
System.Action m_timeoutHandler = null
 
CanvasGroup m_mainCanvasGroup = null
 
- Protected Attributes inherited from PixelCrushers.UIPanel
bool m_deactivateOnHidden = true
 
GameObject m_previousSelected = null
 
GameObject m_lastSelected = null
 
List< GameObject > selectables = new List<GameObject>()
 

Static Protected Attributes

const float WaitForCloseTimeoutDuration = 8f
 
static bool s_isInputDisabled = false
 
- Static Protected Attributes inherited from PixelCrushers.UIPanel
static List< UIPanelpanelStack = new List<UIPanel>()
 

Properties

virtual bool hasFocus [get, protected set]
 
override bool waitForShowAnimation [get]
 
List< GameObject > instantiatedButtons [get]
 The instantiated buttons.
 
List< GameObject > instantiatedButtonPool [get]
 
StandardDialogueUI dialogueUI [get]
 
- Properties inherited from PixelCrushers.UIPanel
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

Additional Inherited Members

- Public Types inherited from PixelCrushers.UIPanel
enum  StartState { GameObjectState , Open , Closed }
 
enum  PanelState {
  Uninitialized , Opening , Open , Closing ,
  Closed
}
 
- Static Public Attributes inherited from PixelCrushers.UIPanel
static bool monitorSelection = true
 If false, turns off checking of current selection to make sure a valid selectable is selected.
 

Member Function Documentation

◆ ActivateUIElements()

void PixelCrushers.DialogueSystem.StandardUIMenuPanel.ActivateUIElements ( )
inlineprotected

◆ Awake()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.Awake ( )
inlinevirtual

◆ CheckFocus()

override void PixelCrushers.DialogueSystem.StandardUIMenuPanel.CheckFocus ( )
inlinevirtual

Reimplemented from PixelCrushers.UIPanel.

◆ CheckScrollbar()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.CheckScrollbar ( )
inlineprotectedvirtual

◆ CheckScrollbarCoroutine()

IEnumerator PixelCrushers.DialogueSystem.StandardUIMenuPanel.CheckScrollbarCoroutine ( )
inlineprotected

◆ ClearResponseButtons()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.ClearResponseButtons ( )
inlineprotectedvirtual

◆ Close()

override void PixelCrushers.DialogueSystem.StandardUIMenuPanel.Close ( )
inlinevirtual

Reimplemented from PixelCrushers.UIPanel.

◆ DeactivateUIElements()

void PixelCrushers.DialogueSystem.StandardUIMenuPanel.DeactivateUIElements ( )
inlineprotected

◆ DestroyInstantiatedButtons()

void PixelCrushers.DialogueSystem.StandardUIMenuPanel.DestroyInstantiatedButtons ( )
inline

◆ DisableInput()

void PixelCrushers.DialogueSystem.StandardUIMenuPanel.DisableInput ( )
inlineprotected

◆ EnableInput()

void PixelCrushers.DialogueSystem.StandardUIMenuPanel.EnableInput ( )
inlineprotected

◆ Focus()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.Focus ( )
inlinevirtual

◆ FocusNow()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.FocusNow ( )
inlineprotectedvirtual

◆ FocusWhenOpen()

IEnumerator PixelCrushers.DialogueSystem.StandardUIMenuPanel.FocusWhenOpen ( )
inlineprotected

◆ GetNextAvailableResponseButtonPosition()

int PixelCrushers.DialogueSystem.StandardUIMenuPanel.GetNextAvailableResponseButtonPosition ( int  start,
int  direction 
)
inlineprotected

◆ HideImmediate()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.HideImmediate ( )
inlinevirtual

◆ HideResponses()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.HideResponses ( )
inlinevirtual

◆ InstantiateButton()

virtual GameObject PixelCrushers.DialogueSystem.StandardUIMenuPanel.InstantiateButton ( )
inlineprotectedvirtual

◆ MakeButtonsNonclickable()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.MakeButtonsNonclickable ( )
inlinevirtual

Makes the panel's buttons non-clickable.

Typically called by the dialogue UI as soon as a button has been clicked to make sure the player can't click another one while the menu is playing its hide animation.

◆ NotifyContentChanged()

void PixelCrushers.DialogueSystem.StandardUIMenuPanel.NotifyContentChanged ( )
inlineprotected

◆ SetInput()

void PixelCrushers.DialogueSystem.StandardUIMenuPanel.SetInput ( bool  value)
inlineprotected

◆ SetPCPortrait() [1/2]

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.SetPCPortrait ( Sprite  portraitSprite,
string  portraitName 
)
inlinevirtual

◆ SetPCPortrait() [2/2]

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.SetPCPortrait ( Texture2D  portraitTexture,
string  portraitName 
)
inlinevirtual

◆ SetResponseButton()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.SetResponseButton ( StandardUIResponseButton  button,
Response  response,
Transform  target,
int  buttonNumber 
)
inlineprotectedvirtual

◆ SetResponseButtons()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.SetResponseButtons ( Response[]  responses,
Transform  target 
)
inlineprotectedvirtual

Sets the response buttons.

Parameters
responsesResponses.
targetTarget that will receive OnClick events from the buttons.

◆ SetUIElementsActive()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.SetUIElementsActive ( bool  value)
inlineprotectedvirtual

◆ SetupTemplateButtonNavigation()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.SetupTemplateButtonNavigation ( bool  hasDisabledButton)
inlinevirtual

◆ ShowAfterPanelsClose()

virtual IEnumerator PixelCrushers.DialogueSystem.StandardUIMenuPanel.ShowAfterPanelsClose ( Subtitle  subtitle,
Response[]  responses,
Transform  target 
)
inlineprotectedvirtual

◆ ShowResponses()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.ShowResponses ( Subtitle  subtitle,
Response[]  responses,
Transform  target 
)
inlinevirtual

◆ ShowResponsesNow()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.ShowResponsesNow ( Subtitle  subtitle,
Response[]  responses,
Transform  target 
)
inlineprotectedvirtual

◆ StartTimer()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.StartTimer ( float  timeout,
System::Action  timeoutHandler 
)
inlinevirtual

Starts the timer.

Parameters
timeoutTimeout duration in seconds.
timeoutHandlerInvoke this handler on timeout.

◆ StopTimer()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.StopTimer ( )
inlinevirtual

◆ Unfocus()

virtual void PixelCrushers.DialogueSystem.StandardUIMenuPanel.Unfocus ( )
inlinevirtual

◆ Update()

override void PixelCrushers.DialogueSystem.StandardUIMenuPanel.Update ( )
inlineprotectedvirtual

Reimplemented from PixelCrushers.UIPanel.

Member Data Documentation

◆ autonumber

UIAutonumberSettings PixelCrushers.DialogueSystem.StandardUIMenuPanel.autonumber = new UIAutonumberSettings()

◆ blockInputDuration

float PixelCrushers.DialogueSystem.StandardUIMenuPanel.blockInputDuration = 0

◆ buttonAlignment

ResponseButtonAlignment PixelCrushers.DialogueSystem.StandardUIMenuPanel.buttonAlignment = ResponseButtonAlignment.ToFirst

◆ buttons

StandardUIResponseButton [] PixelCrushers.DialogueSystem.StandardUIMenuPanel.buttons

◆ buttonTemplate

StandardUIResponseButton PixelCrushers.DialogueSystem.StandardUIMenuPanel.buttonTemplate

◆ buttonTemplateHolder

UnityEngine.UI.Graphic PixelCrushers.DialogueSystem.StandardUIMenuPanel.buttonTemplateHolder

◆ buttonTemplateScrollbar

UnityEngine.UI.Scrollbar PixelCrushers.DialogueSystem.StandardUIMenuPanel.buttonTemplateScrollbar

◆ buttonTemplateScrollbarResetValue

float PixelCrushers.DialogueSystem.StandardUIMenuPanel.buttonTemplateScrollbarResetValue = 1

◆ explicitNavigationForTemplateButtons

bool PixelCrushers.DialogueSystem.StandardUIMenuPanel.explicitNavigationForTemplateButtons = true

◆ focusAnimationTrigger

string PixelCrushers.DialogueSystem.StandardUIMenuPanel.focusAnimationTrigger = string.Empty

◆ loopExplicitNavigation

bool PixelCrushers.DialogueSystem.StandardUIMenuPanel.loopExplicitNavigation = false

◆ m_mainCanvasGroup

CanvasGroup PixelCrushers.DialogueSystem.StandardUIMenuPanel.m_mainCanvasGroup = null
protected

◆ m_timeoutHandler

System.Action PixelCrushers.DialogueSystem.StandardUIMenuPanel.m_timeoutHandler = null
protected

◆ m_timer

StandardUITimer PixelCrushers.DialogueSystem.StandardUIMenuPanel.m_timer = null
protected

◆ onContentChanged

UnityEvent PixelCrushers.DialogueSystem.StandardUIMenuPanel.onContentChanged = new UnityEvent()

◆ onFocus

UnityEvent PixelCrushers.DialogueSystem.StandardUIMenuPanel.onFocus = new UnityEvent()

Invoked when the subtitle panel gains focus.

◆ onUnfocus

UnityEvent PixelCrushers.DialogueSystem.StandardUIMenuPanel.onUnfocus = new UnityEvent()

Invoked when the subtitle panel loses focus.

◆ panel

UnityEngine.UI.Graphic PixelCrushers.DialogueSystem.StandardUIMenuPanel.panel

◆ pcImage

UnityEngine.UI.Image PixelCrushers.DialogueSystem.StandardUIMenuPanel.pcImage

◆ pcName

UITextField PixelCrushers.DialogueSystem.StandardUIMenuPanel.pcName

◆ s_isInputDisabled

bool PixelCrushers.DialogueSystem.StandardUIMenuPanel.s_isInputDisabled = false
staticprotected

◆ scrollbarEnabler

UIScrollbarEnabler PixelCrushers.DialogueSystem.StandardUIMenuPanel.scrollbarEnabler

◆ showSelectionWhileInputBlocked

bool PixelCrushers.DialogueSystem.StandardUIMenuPanel.showSelectionWhileInputBlocked = false

◆ showUnusedButtons

bool PixelCrushers.DialogueSystem.StandardUIMenuPanel.showUnusedButtons = false

◆ timerSlider

UnityEngine.UI.Slider PixelCrushers.DialogueSystem.StandardUIMenuPanel.timerSlider

◆ unfocusAnimationTrigger

string PixelCrushers.DialogueSystem.StandardUIMenuPanel.unfocusAnimationTrigger = string.Empty

◆ usePortraitNativeSize

bool PixelCrushers.DialogueSystem.StandardUIMenuPanel.usePortraitNativeSize = false

◆ waitForClose

bool PixelCrushers.DialogueSystem.StandardUIMenuPanel.waitForClose = false

◆ WaitForCloseTimeoutDuration

const float PixelCrushers.DialogueSystem.StandardUIMenuPanel.WaitForCloseTimeoutDuration = 8f
staticprotected

◆ warnOnEmptyResponseText

bool PixelCrushers.DialogueSystem.StandardUIMenuPanel.warnOnEmptyResponseText = false

Property Documentation

◆ dialogueUI

StandardDialogueUI PixelCrushers.DialogueSystem.StandardUIMenuPanel.dialogueUI
getprotected

◆ hasFocus

virtual bool PixelCrushers.DialogueSystem.StandardUIMenuPanel.hasFocus
getprotected set

◆ instantiatedButtonPool

List<GameObject> PixelCrushers.DialogueSystem.StandardUIMenuPanel.instantiatedButtonPool
getprotected

◆ instantiatedButtons

List<GameObject> PixelCrushers.DialogueSystem.StandardUIMenuPanel.instantiatedButtons
get

The instantiated buttons.

These are only valid during a specific response menu, and only if you're using templates. Each showing of the response menu clears this list and re-populates it with new buttons.

◆ waitForShowAnimation

override bool PixelCrushers.DialogueSystem.StandardUIMenuPanel.waitForShowAnimation
get

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