PixelCrushers.DialogueSystem.IDialogueUI Interface Reference

Interface for dialogue UI components. More...

Inheritance diagram for PixelCrushers.DialogueSystem.IDialogueUI:

Public Member Functions

void Open ()
 Called when a conversation starts, use Open() to do any setup – for example, to show the conversation GUI controls.
 
void Close ()
 Called when a conversation ends, use Close() to clean up – for example, to hide the conversation GUI controls.
 
void ShowSubtitle (Subtitle subtitle)
 Shows a subtitle.
 
void HideSubtitle (Subtitle subtitle)
 Hides a subtitle.
 
void ShowResponses (Subtitle subtitle, Response[] responses, float timeout)
 Shows the player response menu.
 
void HideResponses ()
 Hides the player response menu.
 
void ShowQTEIndicator (int index)
 Shows a QTE (Quick Time Event) indicator.
 
void HideQTEIndicator (int index)
 Hides a QTE (Quick Time Event) indicator.
 
void ShowAlert (string message, float duration)
 Shows an alert message.
 
void HideAlert ()
 Hides the alert message if it's showing.
 

Events

EventHandler< SelectedResponseEventArgsSelectedResponseHandler
 Your implementation must define this event and make it public.
 

Detailed Description

Interface for dialogue UI components.

A dialogue UI is responsible for displaying subtitles, presenting the player response menu, and showing alerts.

See UnityDialogueUI for a reference implementation that uses Unity GUI.

Member Function Documentation

◆ Close()

void PixelCrushers.DialogueSystem.IDialogueUI.Close ( )

Called when a conversation ends, use Close() to clean up – for example, to hide the conversation GUI controls.

Implemented in PixelCrushers.DialogueSystem.BarkDialogueUI, PixelCrushers.DialogueSystem.AbstractDialogueUI, PixelCrushers.DialogueSystem.SMSDialogueUI, and PixelCrushers.DialogueSystem.StandardDialogueUI.

◆ HideAlert()

void PixelCrushers.DialogueSystem.IDialogueUI.HideAlert ( )

Hides the alert message if it's showing.

Implemented in PixelCrushers.DialogueSystem.BarkDialogueUI, and PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ HideQTEIndicator()

void PixelCrushers.DialogueSystem.IDialogueUI.HideQTEIndicator ( int  index)

Hides a QTE (Quick Time Event) indicator.

Parameters
indexIndex number of the QTE indicator.

If your project doesn't use QTEs, you can just create an empty method.

Implemented in PixelCrushers.DialogueSystem.BarkDialogueUI, and PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ HideResponses()

◆ HideSubtitle()

◆ Open()

◆ ShowAlert()

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

Shows an alert message.

The dialogue system will not call Open() before ShowAlert(), nor Close() afterward, since alert messages are intended to be shown outside of conversations.

Parameters
messageThe message to show.
durationThe duration in seconds to show the message.

Implemented in PixelCrushers.DialogueSystem.NGUISupport.NGUIDialogueUI, PixelCrushers.DialogueSystem.TextMeshProSupport.TextMeshProDialogueUI, PixelCrushers.DialogueSystem.BarkDialogueUI, PixelCrushers.DialogueSystem.AbstractDialogueUI, PixelCrushers.DialogueSystem.StandardDialogueUI, and PixelCrushers.DialogueSystem.UnityUIDialogueUI.

◆ ShowQTEIndicator()

void PixelCrushers.DialogueSystem.IDialogueUI.ShowQTEIndicator ( int  index)

Shows a QTE (Quick Time Event) indicator.

Parameters
indexIndex number of the QTE indicator.

If your project doesn't use QTEs, you can just create an empty method.

Implemented in PixelCrushers.DialogueSystem.BarkDialogueUI, and PixelCrushers.DialogueSystem.AbstractDialogueUI.

◆ ShowResponses()

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

Shows the player response menu.

When the player selects a response, your implementation must call the SelectedResponseHandler event and pass along a SelectedResponseEventArgs object containing the selected response.

Example: private void OnResponseClicked(Response response) { SelectedResponseHandler(this, new SelectedResponseEventArgs(response)); }

Parameters
subtitleThe most recently displayed subtitle. Your implementation might show this subtitle to remind the player what he or she is responding to.
responsesThe responses.
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.

Implemented in PixelCrushers.DialogueSystem.TextMeshProSupport.TextMeshProDialogueUI, PixelCrushers.DialogueSystem.BarkDialogueUI, PixelCrushers.DialogueSystem.AbstractDialogueUI, PixelCrushers.DialogueSystem.SMSDialogueUI, PixelCrushers.DialogueSystem.StandardDialogueUI, and PixelCrushers.DialogueSystem.UnityUIDialogueUI.

◆ ShowSubtitle()

Event Documentation

◆ SelectedResponseHandler

EventHandler<SelectedResponseEventArgs> PixelCrushers.DialogueSystem.IDialogueUI.SelectedResponseHandler

Your implementation must define this event and make it public.

Example:

public event EventHandler<SelectedResponseEventArgs> SelectedResponseHandler;


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