Handles the user interaction part of a conversation. More...
Public Member Functions | |
void | Initialize (IDialogueUI ui, Sequencer sequencer, DisplaySettings displaySettings, DialogueEntrySpokenDelegate dialogueEntrySpokenHandler) |
Initialize a UI and sequencer with displaySettings. | |
void | Close () |
Close the conversation view. | |
void | Update () |
Checks if the player has cancelled the conversation. | |
void | StartSubtitle (Subtitle subtitle, bool isPCResponseMenuNext, bool isPCAutoResponseNext) |
Starts displaying a subtitle. | |
void | SetupContinueButton () |
Determines whether the continue button should be shown, and shows or hides it. | |
void | ShowLastNPCSubtitle () |
Shows the most recently displayed subtitle. | |
void | OnConversationContinue (IDialogueUI dialogueUI) |
Continues this conversation if the dialogue UI matches. | |
void | OnConversationContinueAll () |
Continues all conversations. | |
void | HandleContinueButtonClick () |
void | StartResponses (Subtitle subtitle, Response[] responses) |
Displays the player response menu. | |
void | SelectResponse (SelectedResponseEventArgs e) |
string | GetDefaultSequence (Subtitle subtitle) |
Gets the default sequence for a subtitle. | |
float | GetDefaultSubtitleDuration (string text) |
| |
void | SetPCPortrait (Sprite pcSprite, string pcName) |
Sets the PC portrait to use for the response menu. | |
void | SetActorPortraitSprite (string actorName, Sprite sprite) |
Sets the portrait sprite to use in the UI for an actor. | |
Static Public Member Functions | |
static float | GetDefaultSubtitleDurationInSeconds (string text, DisplaySettings displaySettings=null) |
A duration based on the text length and the Dialogue Manager's Subtitle Settings > Min Subtitle Seconds and Subtitle Chars Per Second. | |
Static Public Attributes | |
static GetDefaultSubtitleDurationDelegate | overrideGetDefaultSubtitleDuration = null |
You can assign a function here to override the method used to determine the default subtitle duration – that is, the value of {{end}}. | |
Properties | |
DisplaySettings | displaySettings [get] |
bool | isWaitingForContinue [get] |
Sequencer | sequencer [get] |
IDialogueUI | dialogueUI [get, set] |
Events | |
EventHandler | FinishedSubtitleHandler = null |
Called when a subtitle is finished displaying (including text delay and cutscene sequence). | |
EventHandler< SelectedResponseEventArgs > | SelectedResponseHandler = null |
Called when the player selects a response. | |
Handles the user interaction part of a conversation.
The ConversationController provides the content. ConversationView processes UI events and hands control to ConversationController.
|
inline |
Close the conversation view.
|
inline |
Gets the default sequence for a subtitle.
subtitle | Subtitle. |
|
inline |
Also factors in time for RPGMaker-style pause codes.
|
inlinestatic |
A duration based on the text length and the Dialogue Manager's Subtitle Settings > Min Subtitle Seconds and Subtitle Chars Per Second.
Also factors in time for RPGMaker-style pause codes.
text | Text. |
displaySettings | If null, uses Dialogue Manager's Display Settings. |
|
inline |
|
inline |
Initialize a UI and sequencer with displaySettings.
ui | Dialogue UI. |
sequencer | Sequencer. |
displaySettings | Display settings to initiate the UI and sequencer with. |
|
inline |
Continues this conversation if the dialogue UI matches.
dialogueUI |
|
inline |
Continues all conversations.
|
inline |
|
inline |
Sets the portrait sprite to use in the UI for an actor.
This is used when the SetPortrait() sequencer command changes an actor's image.
actorName | Actor name. |
sprite | Portrait sprite. |
|
inline |
Sets the PC portrait to use for the response menu.
pcSprite | PC sprite. |
pcName | PC name. |
|
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.
|
inline |
Shows the most recently displayed subtitle.
|
inline |
Displays the player response menu.
subtitle | Last subtitle, to display as a reminder of what the player is responding to. |
responses | Responses. |
|
inline |
Starts displaying a subtitle.
subtitle | Subtitle to display. |
isPCResponseNext | Indicates whether the next stage is the player or NPC. |
isPCAutoResponseNext | Indicates whether the next stage is a player auto-response. |
|
inline |
Checks if the player has cancelled the conversation.
|
static |
You can assign a function here to override the method used to determine the default subtitle duration – that is, the value of {{end}}.
|
getset |
|
get |
|
get |
|
get |
EventHandler PixelCrushers.DialogueSystem.ConversationView.FinishedSubtitleHandler = null |
Called when a subtitle is finished displaying (including text delay and cutscene sequence).
EventHandler<SelectedResponseEventArgs> PixelCrushers.DialogueSystem.ConversationView.SelectedResponseHandler = null |
Called when the player selects a response.