PixelCrushers.DialogueSystem.AbstractDialogueUI Class Reference

This abstract class forms the base for IDialogueUI implementations in Unity GUI, NGUI, Daikon Forge GUI, and 2D Toolkit. More...

Inheritance diagram for PixelCrushers.DialogueSystem.AbstractDialogueUI:
Collaboration diagram for PixelCrushers.DialogueSystem.AbstractDialogueUI:

Public Member Functions

virtual void Awake ()
 Sets up the component. More...
 
virtual void Start ()
 Starts this instance by hiding everything. More...
 
virtual void Open ()
 Opens the conversation GUI. More...
 
virtual void Close ()
 Closes the conversation GUI. More...
 
virtual void ShowAlert (string message, float duration)
 Shows an alert. More...
 
virtual void HideAlert ()
 Hides the alert if it's showing. More...
 
virtual void Update ()
 Updates this instance by hiding the alert message when it's done. More...
 
virtual void ShowSubtitle (Subtitle subtitle)
 Shows the subtitle (NPC or PC) based on the character type. More...
 
virtual void HideSubtitle (Subtitle subtitle)
 Hides the subtitle based on its character type (PC or NPC). More...
 
virtual void ShowContinueButton (Subtitle subtitle)
 Shows the continue button. More...
 
virtual void HideContinueButton (Subtitle subtitle)
 Hides the continue button. More...
 
virtual void ShowResponses (Subtitle subtitle, Response[] responses, float timeout)
 Shows the player responses menu. More...
 
virtual void HideResponses ()
 Hides the player response menu. More...
 
virtual void ShowQTEIndicator (int index)
 Shows a QTE indicator. More...
 
virtual void HideQTEIndicator (int index)
 Hides a QTE indicator. More...
 
virtual void OnClick (object data)
 Handles response button clicks. More...
 
virtual void OnContinue ()
 Handles the continue button being clicked. More...
 
virtual void OnContinueAlert ()
 
virtual void OnContinueConversation ()
 
virtual void SetPCPortrait (Texture2D portraitTexture, string portraitName)
 Sets the PC portrait name and texture. More...
 
virtual void SetActorPortraitTexture (string actorName, Texture2D portraitTexture)
 Sets the portrait texture for an actor. More...
 

Static Public Member Functions

static Texture2D GetValidPortraitTexture (string actorName, Texture2D portraitTexture)
 Gets a valid portrait texture. More...
 

Protected Member Functions

virtual void SetSubtitle (Subtitle subtitle, bool value)
 Sets a subtitle's content and visibility. More...
 

Properties

abstract AbstractUIRoot UIRoot [get]
 Gets the user interface root. More...
 
abstract AbstractDialogueUIControls Dialogue [get]
 Gets the dialogue controls. More...
 
abstract AbstractUIQTEControls QTEs [get]
 Gets the QTE (Quick Time Event) indicators. More...
 
abstract AbstractUIAlertControls Alert [get]
 Gets the alert message controls. More...
 
bool IsOpen [get, set]
 Gets or sets a value indicating whether the dialogue UI (conversation interface) is open. More...
 
virtual bool AreNonDialogueControlsVisible [get]
 Gets a value indicating whether non-conversation controls (e.g., alert message or QTEs) are visible. More...
 

Events

EventHandler< SelectedResponseEventArgsSelectedResponseHandler
 Occurs when the player selects a response. More...
 
- Events inherited from PixelCrushers.DialogueSystem.IDialogueUI
EventHandler< SelectedResponseEventArgsSelectedResponseHandler
 Your implementation must define this event and make it public. More...
 

Detailed Description

This abstract class forms the base for IDialogueUI implementations in Unity GUI, NGUI, Daikon Forge GUI, and 2D Toolkit.

It implements common code so that the specific implementation for each GUI system need only deal with the data structures specific to each GUI system.

Member Function Documentation

◆ Awake()

◆ Close()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.Close ( )
virtual

Closes the conversation GUI.

Implements PixelCrushers.DialogueSystem.IDialogueUI.

Reimplemented in PixelCrushers.DialogueSystem.RPGKit.RPGKitDialogueUI.

◆ GetValidPortraitTexture()

static Texture2D PixelCrushers.DialogueSystem.AbstractDialogueUI.GetValidPortraitTexture ( string  actorName,
Texture2D  portraitTexture 
)
static

Gets a valid portrait texture.

If the provided portraitTexture is null, grabs the default textures from the database.

Returns
The valid portrait texture.
Parameters
actorNameActor name.
portraitTexturePortrait texture.

◆ HideAlert()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.HideAlert ( )
virtual

Hides the alert if it's showing.

Implements PixelCrushers.DialogueSystem.IDialogueUI.

◆ HideContinueButton()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.HideContinueButton ( Subtitle  subtitle)
virtual

Hides the continue button.

Call this after showing the subtitle. The ConversationView uses this to hide the continue button if the display setting for continue buttons is set to NotBeforeResponseMenu.

Parameters
subtitleSubtitle.

◆ HideQTEIndicator()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.HideQTEIndicator ( int  index)
virtual

Hides a QTE indicator.

Parameters
indexIndex of the QTE indicator.

Implements PixelCrushers.DialogueSystem.IDialogueUI.

◆ HideResponses()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.HideResponses ( )
virtual

◆ HideSubtitle()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.HideSubtitle ( Subtitle  subtitle)
virtual

◆ OnClick()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.OnClick ( object  data)
virtual

Handles response button clicks.

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

◆ OnContinue()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.OnContinue ( )
virtual

Handles the continue button being clicked.

This sends OnConversationContinue to the DialogueManager object so the ConversationView knows to progress the conversation.

Reimplemented in PixelCrushers.DialogueSystem.NGUI.NGUIDialogueUI.

◆ OnContinueAlert()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.OnContinueAlert ( )
virtual

◆ OnContinueConversation()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.OnContinueConversation ( )
virtual

◆ Open()

◆ SetActorPortraitTexture()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.SetActorPortraitTexture ( string  actorName,
Texture2D  portraitTexture 
)
virtual

Sets the portrait texture for an actor.

This is used to immediately update the GUI control if the SetPortrait() sequencer command changes the portrait texture.

Parameters
actorNameActor name in database.
portraitTexturePortrait texture.

◆ SetPCPortrait()

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

Sets the PC portrait name and texture.

Parameters
portraitTexturePortrait texture.
portraitNamePortrait name.

◆ SetSubtitle()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.SetSubtitle ( Subtitle  subtitle,
bool  value 
)
protectedvirtual

Sets a subtitle's content and visibility.

Parameters
subtitleSubtitle. The speaker recorded in the subtitle determines whether the NPC or PC subtitle controls are used.
valuetrue to show; false to hide.

◆ ShowAlert()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.ShowAlert ( string  message,
float  duration 
)
virtual

◆ ShowContinueButton()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.ShowContinueButton ( Subtitle  subtitle)
virtual

Shows the continue button.

Parameters
subtitleSubtitle.

◆ ShowQTEIndicator()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.ShowQTEIndicator ( int  index)
virtual

Shows a QTE indicator.

Parameters
indexIndex of the QTE indicator.

Implements PixelCrushers.DialogueSystem.IDialogueUI.

◆ ShowResponses()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.ShowResponses ( Subtitle  subtitle,
Response[]  responses,
float  timeout 
)
virtual

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.

Implements PixelCrushers.DialogueSystem.IDialogueUI.

Reimplemented in PixelCrushers.DialogueSystem.UnityUIDialogueUI, PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProDialogueUI, and PixelCrushers.DialogueSystem.NGUI.DualSubtitleNGUIDialogueUI.

◆ ShowSubtitle()

◆ Start()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.Start ( )
virtual

Starts this instance by hiding everything.

The only exception is if an alert message is already showing; it keeps this message visible.

Reimplemented in PixelCrushers.DialogueSystem.TK2D.TK2DDialogueUI, and PixelCrushers.DialogueSystem.RPGKit.RPGKitDialogueUI.

◆ Update()

virtual void PixelCrushers.DialogueSystem.AbstractDialogueUI.Update ( )
virtual

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

Reimplemented in PixelCrushers.DialogueSystem.UnityUIDialogueUI, and PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProDialogueUI.

Property Documentation

◆ Alert

abstract AbstractUIAlertControls PixelCrushers.DialogueSystem.AbstractDialogueUI.Alert
get

Gets the alert message controls.

The alert message controls

◆ AreNonDialogueControlsVisible

virtual bool PixelCrushers.DialogueSystem.AbstractDialogueUI.AreNonDialogueControlsVisible
getprotected

Gets a value indicating whether non-conversation controls (e.g., alert message or QTEs) are visible.

true if non-conversation controls are visible; otherwise, false.

◆ Dialogue

abstract AbstractDialogueUIControls PixelCrushers.DialogueSystem.AbstractDialogueUI.Dialogue
get

Gets the dialogue controls.

The dialogue controls.

◆ IsOpen

bool PixelCrushers.DialogueSystem.AbstractDialogueUI.IsOpen
getset

Gets or sets a value indicating whether the dialogue UI (conversation interface) is open.

true if open; otherwise, false.

◆ QTEs

abstract AbstractUIQTEControls PixelCrushers.DialogueSystem.AbstractDialogueUI.QTEs
get

Gets the QTE (Quick Time Event) indicators.

The QTE indicators.

◆ UIRoot

abstract AbstractUIRoot PixelCrushers.DialogueSystem.AbstractDialogueUI.UIRoot
get

Gets the user interface root.

The user interface root.

Event Documentation

◆ SelectedResponseHandler

EventHandler<SelectedResponseEventArgs> PixelCrushers.DialogueSystem.AbstractDialogueUI.SelectedResponseHandler

Occurs when the player selects a response.


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