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

Public Member Functions

override void Awake ()
 Sets up the component.
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 
void OnSceneLoaded (UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode mode)
 
override void Open ()
 Opens the conversation GUI.
 
override void Close ()
 Closes the conversation GUI.
 
virtual bool AreAnyPanelsClosing (StandardUISubtitlePanel extraSubtitlePanel=null)
 
override void Update ()
 Updates this instance by hiding the alert message when it's done.
 
override void ShowAlert (string message, float duration)
 Shows an alert.
 
override void HideAllAlerts ()
 Hides the alert if it's showing.
 
override void ShowSubtitle (Subtitle subtitle)
 Shows the subtitle (NPC or PC) based on the character type.
 
override void HideSubtitle (Subtitle subtitle)
 Hides the subtitle based on its character type (PC or NPC).
 
virtual float GetTypewriterSpeed ()
 Returns the speed of the first typewriter effect found.
 
virtual void SetTypewriterSpeed (float charactersPerSecond)
 Sets the speed of all typewriter effects.
 
virtual void SetActorSubtitlePanelNumber (DialogueActor dialogueActor, SubtitlePanelNumber subtitlePanelNumber)
 Changes a dialogue actor's subtitle panel for the currently active conversation.
 
virtual void SetActorMenuPanelNumber (DialogueActor dialogueActor, MenuPanelNumber menuPanelNumber)
 Changes a dialogue actor's menu panel for the currently active conversation.
 
virtual void OverrideActorPanel (Actor actor, SubtitlePanelNumber subtitlePanelNumber, bool immediate=false)
 
virtual void ForceOverrideSubtitlePanel (StandardUISubtitlePanel customPanel)
 
virtual void ShowActorInPanel (Actor actor, SubtitlePanelNumber subtitlePanelNumber, StandardUISubtitlePanel customPanel=null)
 Shows an actor immediately in a subtitle panel.
 
override void ShowResponses (Subtitle subtitle, Response[] responses, float timeout)
 Shows the player responses menu.
 
override void OnClick (object data)
 Handles response button clicks.
 
virtual void OverrideActorMenuPanel (Transform actorTransform, MenuPanelNumber menuPanelNumber, StandardUIMenuPanel customPanel)
 
virtual void OverrideActorMenuPanel (Actor actor, MenuPanelNumber menuPanelNumber, StandardUIMenuPanel customPanel)
 
virtual void ForceOverrideMenuPanel (StandardUIMenuPanel customPanel)
 
- Public Member Functions inherited from PixelCrushers.DialogueSystem.AbstractDialogueUI
virtual void Start ()
 Starts this instance by hiding everything.
 
virtual void HideAlert ()
 Hides the alert if it's showing.
 
virtual void ShowContinueButton (Subtitle subtitle)
 Shows the continue button.
 
virtual void HideContinueButton (Subtitle subtitle)
 Hides the continue button.
 
virtual void HideResponses ()
 Hides the player response menu.
 
virtual void ShowQTEIndicator (int index)
 Shows a QTE indicator.
 
virtual void HideQTEIndicator (int index)
 Hides a QTE indicator.
 
virtual void OnContinue ()
 Handles the continue button being clicked.
 
virtual void OnContinueAlert ()
 
virtual void OnContinueConversation ()
 
virtual void SetPCPortrait (Sprite portraitSprite, string portraitName)
 Sets the PC portrait name and sprite.
 
virtual void SetPCPortrait (Texture2D portraitTexture, string portraitName)
 
virtual void SetActorPortraitSprite (string actorName, Sprite portraitSprite)
 Sets the portrait sprite for an actor.
 

Public Attributes

StandardUIAlertControls alertUIElements
 
StandardUIDialogueControls conversationUIElements
 
StandardUIQTEControls QTEIndicatorElements
 
bool addEventSystemIfNeeded = true
 
bool verifyPanelAssignments = true
 

Protected Member Functions

virtual void CloseNow ()
 
IEnumerator CloseAfterPanelsAreClosed ()
 
virtual bool IsMainPanelClosed ()
 
virtual IEnumerator ShowSubtitleWhenMainPanelOpen (Subtitle subtitle)
 
virtual void ShowSubtitleImmediate (Subtitle subtitle)
 
virtual IEnumerator ShowResponsesWhenMainPanelOpen (Subtitle subtitle, Response[] responses, float timeout)
 
virtual void ShowResponsesImmediate (Subtitle subtitle, Response[] responses, float timeout)
 
- Protected Member Functions inherited from PixelCrushers.DialogueSystem.AbstractDialogueUI
virtual void SetSubtitle (Subtitle subtitle, bool value)
 Sets a subtitle's content and visibility.
 

Protected Attributes

Coroutine closeCoroutine = null
 

Static Protected Attributes

const float WaitForOpenTimeoutDuration = 8f
 

Properties

override AbstractUIRoot uiRootControls [get]
 
override AbstractUIAlertControls alertControls [get]
 
override AbstractDialogueUIControls dialogueControls [get]
 
override AbstractUIQTEControls qteControls [get]
 
Queue< QueuedUIAlertalertQueue [get]
 
- Properties inherited from PixelCrushers.DialogueSystem.AbstractDialogueUI
AbstractUIRoot uiRootControls [get]
 Gets the user interface root.
 
AbstractDialogueUIControls dialogueControls [get]
 Gets the dialogue controls.
 
AbstractUIQTEControls qteControls [get]
 Gets the QTE (Quick Time Event) indicators.
 
AbstractUIAlertControls alertControls [get]
 Gets the alert message controls.
 
bool isOpen [get, set]
 Gets or sets a value indicating whether the dialogue UI (conversation interface) is open.
 
virtual bool AreNonDialogueControlsVisible [get]
 Gets a value indicating whether non-conversation controls (e.g., alert message or QTEs) are visible.
 

Additional Inherited Members

- Static Public Member Functions inherited from PixelCrushers.DialogueSystem.AbstractDialogueUI
static Sprite GetValidPortraitSprite (string actorName, Sprite portraitSprite)
 Gets a valid portrait sprite.
 
static Texture2D GetValidPortraitTexture (string actorName, Texture2D portraitTexture)
 
- Events inherited from PixelCrushers.DialogueSystem.AbstractDialogueUI
EventHandler< SelectedResponseEventArgsSelectedResponseHandler
 Occurs when the player selects a response.
 
- Events inherited from PixelCrushers.DialogueSystem.IDialogueUI
EventHandler< SelectedResponseEventArgsSelectedResponseHandler
 Your implementation must define this event and make it public.
 

Member Function Documentation

◆ AreAnyPanelsClosing()

virtual bool PixelCrushers.DialogueSystem.StandardDialogueUI.AreAnyPanelsClosing ( StandardUISubtitlePanel  extraSubtitlePanel = null)
inlinevirtual

◆ Awake()

override void PixelCrushers.DialogueSystem.StandardDialogueUI.Awake ( )
inlinevirtual

Sets up the component.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ Close()

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

Closes the conversation GUI.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ CloseAfterPanelsAreClosed()

IEnumerator PixelCrushers.DialogueSystem.StandardDialogueUI.CloseAfterPanelsAreClosed ( )
inlineprotected

◆ CloseNow()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.CloseNow ( )
inlineprotectedvirtual

◆ ForceOverrideMenuPanel()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.ForceOverrideMenuPanel ( StandardUIMenuPanel  customPanel)
inlinevirtual

◆ ForceOverrideSubtitlePanel()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.ForceOverrideSubtitlePanel ( StandardUISubtitlePanel  customPanel)
inlinevirtual

◆ GetTypewriterSpeed()

virtual float PixelCrushers.DialogueSystem.StandardDialogueUI.GetTypewriterSpeed ( )
inlinevirtual

Returns the speed of the first typewriter effect found.

◆ HideAllAlerts()

override void PixelCrushers.DialogueSystem.StandardDialogueUI.HideAllAlerts ( )
inlinevirtual

Hides the alert if it's showing.

Virtual so StandardDialogueUI can override to clear alert queue, too.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ HideSubtitle()

override void PixelCrushers.DialogueSystem.StandardDialogueUI.HideSubtitle ( Subtitle  subtitle)
inlinevirtual

Hides the subtitle based on its character type (PC or NPC).

Parameters
subtitleSubtitle to hide.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ IsMainPanelClosed()

virtual bool PixelCrushers.DialogueSystem.StandardDialogueUI.IsMainPanelClosed ( )
inlineprotectedvirtual

◆ OnClick()

override void PixelCrushers.DialogueSystem.StandardDialogueUI.OnClick ( object  data)
inlinevirtual

Handles response button clicks.

Parameters
dataThe Response assigned to the button. This is passed back to the handler.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ OnDisable()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.OnDisable ( )
inlinevirtual

◆ OnEnable()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.OnEnable ( )
inlinevirtual

◆ OnSceneLoaded()

void PixelCrushers.DialogueSystem.StandardDialogueUI.OnSceneLoaded ( UnityEngine::SceneManagement::Scene  scene,
UnityEngine::SceneManagement::LoadSceneMode  mode 
)
inline

◆ Open()

override void PixelCrushers.DialogueSystem.StandardDialogueUI.Open ( )
inlinevirtual

Opens the conversation GUI.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ OverrideActorMenuPanel() [1/2]

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.OverrideActorMenuPanel ( Actor  actor,
MenuPanelNumber  menuPanelNumber,
StandardUIMenuPanel  customPanel 
)
inlinevirtual

◆ OverrideActorMenuPanel() [2/2]

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.OverrideActorMenuPanel ( Transform  actorTransform,
MenuPanelNumber  menuPanelNumber,
StandardUIMenuPanel  customPanel 
)
inlinevirtual

◆ OverrideActorPanel()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.OverrideActorPanel ( Actor  actor,
SubtitlePanelNumber  subtitlePanelNumber,
bool  immediate = false 
)
inlinevirtual

◆ SetActorMenuPanelNumber()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.SetActorMenuPanelNumber ( DialogueActor  dialogueActor,
MenuPanelNumber  menuPanelNumber 
)
inlinevirtual

Changes a dialogue actor's menu panel for the currently active conversation.

Implements PixelCrushers.DialogueSystem.IStandardDialogueUI.

◆ SetActorSubtitlePanelNumber()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.SetActorSubtitlePanelNumber ( DialogueActor  dialogueActor,
SubtitlePanelNumber  subtitlePanelNumber 
)
inlinevirtual

Changes a dialogue actor's subtitle panel for the currently active conversation.

Implements PixelCrushers.DialogueSystem.IStandardDialogueUI.

◆ SetTypewriterSpeed()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.SetTypewriterSpeed ( float  charactersPerSecond)
inlinevirtual

Sets the speed of all typewriter effects.

◆ ShowActorInPanel()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.ShowActorInPanel ( Actor  actor,
SubtitlePanelNumber  subtitlePanelNumber,
StandardUISubtitlePanel  customPanel = null 
)
inlinevirtual

Shows an actor immediately in a subtitle panel.

◆ ShowAlert()

override void PixelCrushers.DialogueSystem.StandardDialogueUI.ShowAlert ( string  message,
float  duration 
)
inlinevirtual

Shows an alert.

Parameters
messageMessage to show.
durationDuration in seconds.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ ShowResponses()

override void PixelCrushers.DialogueSystem.StandardDialogueUI.ShowResponses ( Subtitle  subtitle,
Response[]  responses,
float  timeout 
)
inlinevirtual

Shows the player responses menu.

Parameters
subtitleThe last subtitle, shown as a reminder.
responsesResponses.
timeoutIf not 0, the duration in seconds that the player has to choose a response; otherwise the currently-focused response is auto-selected. If no response is focused (e.g., hovered over), the first response is auto-selected. If 0, there is no timeout; the player can take as long as desired to choose a response.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ ShowResponsesImmediate()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.ShowResponsesImmediate ( Subtitle  subtitle,
Response[]  responses,
float  timeout 
)
inlineprotectedvirtual

◆ ShowResponsesWhenMainPanelOpen()

virtual IEnumerator PixelCrushers.DialogueSystem.StandardDialogueUI.ShowResponsesWhenMainPanelOpen ( Subtitle  subtitle,
Response[]  responses,
float  timeout 
)
inlineprotectedvirtual

◆ ShowSubtitle()

override void PixelCrushers.DialogueSystem.StandardDialogueUI.ShowSubtitle ( Subtitle  subtitle)
inlinevirtual

Shows the subtitle (NPC or PC) based on the character type.

Parameters
subtitleSubtitle to show.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ ShowSubtitleImmediate()

virtual void PixelCrushers.DialogueSystem.StandardDialogueUI.ShowSubtitleImmediate ( Subtitle  subtitle)
inlineprotectedvirtual

◆ ShowSubtitleWhenMainPanelOpen()

virtual IEnumerator PixelCrushers.DialogueSystem.StandardDialogueUI.ShowSubtitleWhenMainPanelOpen ( Subtitle  subtitle)
inlineprotectedvirtual

◆ Update()

override void PixelCrushers.DialogueSystem.StandardDialogueUI.Update ( )
inlinevirtual

Updates this instance by hiding the alert message when it's done.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

Member Data Documentation

◆ addEventSystemIfNeeded

bool PixelCrushers.DialogueSystem.StandardDialogueUI.addEventSystemIfNeeded = true

◆ alertUIElements

StandardUIAlertControls PixelCrushers.DialogueSystem.StandardDialogueUI.alertUIElements

◆ closeCoroutine

Coroutine PixelCrushers.DialogueSystem.StandardDialogueUI.closeCoroutine = null
protected

◆ conversationUIElements

StandardUIDialogueControls PixelCrushers.DialogueSystem.StandardDialogueUI.conversationUIElements

◆ QTEIndicatorElements

StandardUIQTEControls PixelCrushers.DialogueSystem.StandardDialogueUI.QTEIndicatorElements

◆ verifyPanelAssignments

bool PixelCrushers.DialogueSystem.StandardDialogueUI.verifyPanelAssignments = true

◆ WaitForOpenTimeoutDuration

const float PixelCrushers.DialogueSystem.StandardDialogueUI.WaitForOpenTimeoutDuration = 8f
staticprotected

Property Documentation

◆ alertControls

override AbstractUIAlertControls PixelCrushers.DialogueSystem.StandardDialogueUI.alertControls
get

◆ alertQueue

Queue<QueuedUIAlert> PixelCrushers.DialogueSystem.StandardDialogueUI.alertQueue
getprotected

◆ dialogueControls

override AbstractDialogueUIControls PixelCrushers.DialogueSystem.StandardDialogueUI.dialogueControls
get

◆ qteControls

override AbstractUIQTEControls PixelCrushers.DialogueSystem.StandardDialogueUI.qteControls
get

◆ uiRootControls

override AbstractUIRoot PixelCrushers.DialogueSystem.StandardDialogueUI.uiRootControls
get

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