PixelCrushers.DialogueSystem.ConversationView Class Reference

Handles the user interaction part of a conversation. More...

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

Public Member Functions

void Initialize (IDialogueUI ui, Sequencer sequencer, DisplaySettings displaySettings, DialogueEntrySpokenDelegate dialogueEntrySpokenHandler)
 Initialize a UI and sequencer with displaySettings. More...
 
void Close ()
 Close the conversation view. More...
 
void Update ()
 Checks if the player has cancelled the conversation. More...
 
void StartSubtitle (Subtitle subtitle, bool isPCResponseMenuNext, bool isPCAutoResponseNext)
 Starts displaying a subtitle. More...
 
void SetupContinueButton ()
 Determines whether the continue button should be shown, and shows or hides it. More...
 
void ShowLastNPCSubtitle ()
 Shows the most recently displayed subtitle. More...
 
void OnConversationContinue (IDialogueUI dialogueUI)
 Continues this conversation if the dialogue UI matches. More...
 
void OnConversationContinueAll ()
 Continues all conversations. More...
 
void StartResponses (Subtitle subtitle, Response[] responses)
 Displays the player response menu. More...
 
void SelectResponse (SelectedResponseEventArgs e)
 
string GetDefaultSequence (Subtitle subtitle)
 Gets the default sequence for a subtitle. More...
 
float GetDefaultSubtitleDuration (string text)
 
Returns
A duration based on the text length and the Dialogue Manager's Subtitle Settings > Min Subtitle Seconds and Subtitle Chars Per Second.
More...
 
void SetPCPortrait (Texture2D pcTexture, string pcName)
 Sets the PC portrait to use for the response menu. More...
 
void SetActorPortraitTexture (string actorName, Texture2D portraitTexture)
 Sets the portrait texture to use in the UI for an actor. More...
 

Properties

DisplaySettings displaySettings [get]
 
bool isWaitingForContinue [get]
 

Events

EventHandler FinishedSubtitleHandler = null
 Called when a subtitle is finished displaying (including text delay and cutscene sequence). More...
 
EventHandler< SelectedResponseEventArgsSelectedResponseHandler = null
 Called when the player selects a response. More...
 

Detailed Description

Handles the user interaction part of a conversation.

The ConversationController provides the content. ConversationView processes UI events and hands control to ConversationController.

Member Function Documentation

◆ Close()

void PixelCrushers.DialogueSystem.ConversationView.Close ( )
inline

Close the conversation view.

◆ GetDefaultSequence()

string PixelCrushers.DialogueSystem.ConversationView.GetDefaultSequence ( Subtitle  subtitle)
inline

Gets the default sequence for a subtitle.

Returns
The default sequence.
Parameters
subtitleSubtitle.

◆ GetDefaultSubtitleDuration()

float PixelCrushers.DialogueSystem.ConversationView.GetDefaultSubtitleDuration ( string  text)
inline

Returns
A duration based on the text length and the Dialogue Manager's Subtitle Settings > Min Subtitle Seconds and Subtitle Chars Per Second.

◆ Initialize()

void PixelCrushers.DialogueSystem.ConversationView.Initialize ( IDialogueUI  ui,
Sequencer  sequencer,
DisplaySettings  displaySettings,
DialogueEntrySpokenDelegate  dialogueEntrySpokenHandler 
)
inline

Initialize a UI and sequencer with displaySettings.

Parameters
uiDialogue UI.
sequencerSequencer.
displaySettingsDisplay settings to initiate the UI and sequencer with.

◆ OnConversationContinue()

void PixelCrushers.DialogueSystem.ConversationView.OnConversationContinue ( IDialogueUI  dialogueUI)
inline

Continues this conversation if the dialogue UI matches.

Parameters
dialogueUI

◆ OnConversationContinueAll()

void PixelCrushers.DialogueSystem.ConversationView.OnConversationContinueAll ( )
inline

Continues all conversations.

◆ SelectResponse()

void PixelCrushers.DialogueSystem.ConversationView.SelectResponse ( SelectedResponseEventArgs  e)
inline

◆ SetActorPortraitTexture()

void PixelCrushers.DialogueSystem.ConversationView.SetActorPortraitTexture ( string  actorName,
Texture2D  portraitTexture 
)
inline

Sets the portrait texture to use in the UI for an actor.

This is used when the SetPortrait() sequencer command changes an actor's image.

Parameters
actorNameActor name.
portraitTexturePortrait texture.

◆ SetPCPortrait()

void PixelCrushers.DialogueSystem.ConversationView.SetPCPortrait ( Texture2D  pcTexture,
string  pcName 
)
inline

Sets the PC portrait to use for the response menu.

Parameters
pcTexturePC texture.
pcNamePC name.

◆ SetupContinueButton()

void PixelCrushers.DialogueSystem.ConversationView.SetupContinueButton ( )
inline

Determines whether the continue button should be shown, and shows or hides it.

Call this if you've manually changed the continue button mode while the conversation is displaying a line. In most cases you won't ever need to call this manually.

◆ ShowLastNPCSubtitle()

void PixelCrushers.DialogueSystem.ConversationView.ShowLastNPCSubtitle ( )
inline

Shows the most recently displayed subtitle.

◆ StartResponses()

void PixelCrushers.DialogueSystem.ConversationView.StartResponses ( Subtitle  subtitle,
Response[]  responses 
)
inline

Displays the player response menu.

Parameters
subtitleLast subtitle, to display as a reminder of what the player is responding to.
responsesResponses.

◆ StartSubtitle()

void PixelCrushers.DialogueSystem.ConversationView.StartSubtitle ( Subtitle  subtitle,
bool  isPCResponseMenuNext,
bool  isPCAutoResponseNext 
)
inline

Starts displaying a subtitle.

Parameters
subtitleSubtitle to display.
isPCResponseNextIndicates whether the next stage is the player or NPC.
isPCAutoResponseNextIndicates whether the next stage is a player auto-response.

◆ Update()

void PixelCrushers.DialogueSystem.ConversationView.Update ( )
inline

Checks if the player has cancelled the conversation.

Property Documentation

◆ displaySettings

DisplaySettings PixelCrushers.DialogueSystem.ConversationView.displaySettings
get

◆ isWaitingForContinue

bool PixelCrushers.DialogueSystem.ConversationView.isWaitingForContinue
get

Event Documentation

◆ FinishedSubtitleHandler

EventHandler PixelCrushers.DialogueSystem.ConversationView.FinishedSubtitleHandler = null

Called when a subtitle is finished displaying (including text delay and cutscene sequence).

◆ SelectedResponseHandler

EventHandler<SelectedResponseEventArgs> PixelCrushers.DialogueSystem.ConversationView.SelectedResponseHandler = null

Called when the player selects a response.


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