A TK2D response button for TK2DDialogueUI. More...
Public Member Functions | |
void | SetFormattedText (FormattedText formattedText) |
Sets the button's text using the specified formatted text. More... | |
void | SetUnformattedText (string unformattedText) |
Sets the button's text using plain text. More... | |
void | OnClick () |
Handles a button click by calling the response handler. More... | |
Public Attributes | |
tk2dTextMesh | label |
The text mesh that will display the response text. More... | |
Color | defaultColor = Color.white |
The default color for response text, which can be overridden by emphasis tags. More... | |
Properties | |
string? | Text [get, set] |
Gets or sets the response text. More... | |
bool | IsVisible [get, set] |
Indicates whether the button is shown or not. More... | |
bool | IsClickable [get, set] |
Indicates whether the button is clickable or not. More... | |
Response | Response [get, set] |
Gets or sets the response associated with this button. More... | |
Transform | Target [get, set] |
Gets or sets the target that will receive click notifications. More... | |
A TK2D response button for TK2DDialogueUI.
Add this component to every response button in the dialogue UI. The button should have, at minimum, a tk2dUIItem. If you also assign a tk2dTextMesh to the label, it will contain the response text. This script adds Dialogue System-specific functionality to the tk2dUIItem button.
void PixelCrushers.DialogueSystem.TK2D.TK2DResponseButton.OnClick | ( | ) |
Handles a button click by calling the response handler.
void PixelCrushers.DialogueSystem.TK2D.TK2DResponseButton.SetFormattedText | ( | FormattedText | formattedText | ) |
Sets the button's text using the specified formatted text.
formattedText | The formatted text for the button label. |
void PixelCrushers.DialogueSystem.TK2D.TK2DResponseButton.SetUnformattedText | ( | string | unformattedText | ) |
Sets the button's text using plain text.
unformattedText | Unformatted text for the button label. |
Color PixelCrushers.DialogueSystem.TK2D.TK2DResponseButton.defaultColor = Color.white |
The default color for response text, which can be overridden by emphasis tags.
tk2dTextMesh PixelCrushers.DialogueSystem.TK2D.TK2DResponseButton.label |
The text mesh that will display the response text.
|
getset |
Indicates whether the button is clickable or not.
true
if clickable; otherwise, false
.
|
getset |
Indicates whether the button is shown or not.
true
if visible; otherwise, false
.
|
getset |
Gets or sets the response associated with this button.
If the player clicks this button, this response is sent back to the dialogue system.
The response.
|
getset |
Gets or sets the target that will receive click notifications.
The target.
|
getset |
Gets or sets the response text.
The text.