This component implements IDialogueUI using 2D Toolkit. More...
Public Member Functions | |
override void | Awake () |
Sets up the component. | |
override void | Start () |
Starts this instance by hiding everything. | |
Public Member Functions inherited from PixelCrushers.DialogueSystem.AbstractDialogueUI | |
virtual void | Open () |
Opens the conversation GUI. | |
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 | |
tk2dUILayout | UIRootLayout |
The GUI root. | |
tk2dSpriteCollectionData | portraitCollection |
The sprite collection for portrait image sprites. | |
TK2DDialogueControls | dialogue |
The dialogue controls. | |
tk2dBaseSprite[] | qteIndicators |
The QTE (Quick Time Event) indicators. | |
TK2DAlertControls | 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< SelectedResponseEventArgs > | SelectedResponseHandler |
Occurs when the player selects a response. | |
Events inherited from PixelCrushers.DialogueSystem.IDialogueUI | |
EventHandler< SelectedResponseEventArgs > | SelectedResponseHandler |
Your implementation must define this event and make it public. | |
This component implements IDialogueUI using 2D Toolkit.
It's based on AbstractDialogueUI and compiles the TK2D versions of the controls defined in TK2DSubtitleControls, TK2DResponseMenuControls, TK2DAlertControls, etc.
To use this component, build a 2D Toolkit UI layout (or use a pre-built one in the Prefabs folder) and assign the UI control properties. You can save a TK2DDialogueUI as a prefab and assign the prefab or an instance to the DialogueManager.
If you use portrait images, create a sprite collection and assign it to this component.
|
inlinevirtual |
Sets up the component.
Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.
|
inlinevirtual |
Starts this instance by hiding everything.
The only exception is if an alert message is already showing; it keeps this message visible.
Reimplemented from PixelCrushers.DialogueSystem.AbstractDialogueUI.
TK2DAlertControls PixelCrushers.DialogueSystem.TK2DSupport.TK2DDialogueUI.alert |
The alert message controls.
TK2DDialogueControls PixelCrushers.DialogueSystem.TK2DSupport.TK2DDialogueUI.dialogue |
The dialogue controls.
tk2dSpriteCollectionData PixelCrushers.DialogueSystem.TK2DSupport.TK2DDialogueUI.portraitCollection |
The sprite collection for portrait image sprites.
tk2dBaseSprite [] PixelCrushers.DialogueSystem.TK2DSupport.TK2DDialogueUI.qteIndicators |
The QTE (Quick Time Event) indicators.
tk2dUILayout PixelCrushers.DialogueSystem.TK2DSupport.TK2DDialogueUI.UIRootLayout |
The GUI root.
|
get |
|
get |
|
get |
|
get |