PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI Class Reference

This component implements IDialogueUI using Unity GUI. More...

Inheritance diagram for PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI:
Collaboration diagram for PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI:

Public Member Functions

override void Awake ()
 Sets up the component.
 
override void Open ()
 Opens the conversation GUI.
 
- Public Member Functions inherited from PixelCrushers.DialogueSystem.AbstractDialogueUI
virtual void Start ()
 Starts this instance by hiding everything.
 
virtual void Close ()
 Closes the conversation GUI.
 
virtual void ShowAlert (string message, float duration)
 Shows an alert.
 
virtual void HideAlert ()
 Hides the alert if it's showing.
 
virtual void HideAllAlerts ()
 Hides the alert if it's showing.
 
virtual void Update ()
 Updates this instance by hiding the alert message when it's done.
 
virtual void ShowSubtitle (Subtitle subtitle)
 Shows the subtitle (NPC or PC) based on the character type.
 
virtual void HideSubtitle (Subtitle subtitle)
 Hides the subtitle based on its character type (PC or NPC).
 
virtual void ShowContinueButton (Subtitle subtitle)
 Shows the continue button.
 
virtual void HideContinueButton (Subtitle subtitle)
 Hides the continue button.
 
virtual void ShowResponses (Subtitle subtitle, Response[] responses, float timeout)
 Shows the player responses menu.
 
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 OnClick (object data)
 Handles response button clicks.
 
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

GUIRoot guiRoot
 The GUI root.
 
UnityDialogueControls dialogue
 The dialogue controls.
 
GUIControl[] qteIndicators
 The QTE (Quick Time Event) indicators.
 
UnityAlertControls alert
 The alert message controls.
 

Properties

override AbstractUIRoot uiRootControls [get]
 
override AbstractDialogueUIControls dialogueControls [get]
 
override AbstractUIQTEControls qteControls [get]
 
override AbstractUIAlertControls alertControls [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)
 
- Protected Member Functions inherited from PixelCrushers.DialogueSystem.AbstractDialogueUI
virtual void SetSubtitle (Subtitle subtitle, bool value)
 Sets a subtitle's content and visibility.
 
- 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.
 

Detailed Description

This component implements IDialogueUI using Unity GUI.

It's based on AbstractDialogueUI and compiles the Unity GUI versions of the controls defined in UnitySubtitleControls, UnityResponseMenuControls, etc.

To use this component, build a GUI layout (or use a pre-built one in the Prefabs folder) and assign the GUI control properties. You can save a UnityDialogueUI as a prefab and assign the prefab or an instance to the DialogueManager.

Member Function Documentation

◆ Awake()

override void PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI.Awake ( )
inlinevirtual

Sets up the component.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ Open()

override void PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI.Open ( )
inlinevirtual

Opens the conversation GUI.

Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.

Member Data Documentation

◆ alert

UnityAlertControls PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI.alert

The alert message controls.

◆ dialogue

UnityDialogueControls PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI.dialogue

The dialogue controls.

◆ guiRoot

GUIRoot PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI.guiRoot

The GUI root.

◆ qteIndicators

GUIControl [] PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI.qteIndicators

The QTE (Quick Time Event) indicators.

Property Documentation

◆ alertControls

override AbstractUIAlertControls PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI.alertControls
get

◆ dialogueControls

override AbstractDialogueUIControls PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI.dialogueControls
get

◆ qteControls

override AbstractUIQTEControls PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI.qteControls
get

◆ uiRootControls

override AbstractUIRoot PixelCrushers.DialogueSystem.UnityGUI.UnityDialogueUI.uiRootControls
get

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