PixelCrushers.DialogueSystem.UnityUIResponseButton Class Reference

A Unity UI response button for use with UnityUIDialogueControls. More...

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

Public Member Functions

void Reset ()
 Clears the button. More...
 
void Awake ()
 
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

UnityEngine.UI.Button button
 The UnityUI button. More...
 
UnityEngine.UI.Text label
 The UnityUI label that will display the response text. More...
 
Color defaultColor = Color.white
 The default color for response text. More...
 
bool setButtonColor = false
 Set true to set the button color when applying emphasis tags. More...
 
bool setLabelColor = true
 Set true to set the label color when applying emphasis tags. More...
 

Protected Member Functions

virtual void SetColor (Color currentColor)
 

Properties

string? Text [get, set]
 Gets or sets the response text. More...
 
bool clickable [get, set]
 Indicates whether the button is an allowable response. More...
 
bool visible [get, set]
 Indicates whether the button is shown 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...
 

Detailed Description

A Unity UI response button for use with UnityUIDialogueControls.

Add this component to every response button in the dialogue UI.

Member Function Documentation

◆ Awake()

void PixelCrushers.DialogueSystem.UnityUIResponseButton.Awake ( )

◆ OnClick()

void PixelCrushers.DialogueSystem.UnityUIResponseButton.OnClick ( )

Handles a button click by calling the response handler.

◆ Reset()

void PixelCrushers.DialogueSystem.UnityUIResponseButton.Reset ( )

Clears the button.

◆ SetColor()

virtual void PixelCrushers.DialogueSystem.UnityUIResponseButton.SetColor ( Color  currentColor)
protectedvirtual

◆ SetFormattedText()

void PixelCrushers.DialogueSystem.UnityUIResponseButton.SetFormattedText ( FormattedText  formattedText)

Sets the button's text using the specified formatted text.

Parameters
formattedTextThe formatted text for the button label.

◆ SetUnformattedText()

void PixelCrushers.DialogueSystem.UnityUIResponseButton.SetUnformattedText ( string  unformattedText)

Sets the button's text using plain text.

Parameters
unformattedTextUnformatted text for the button label.

Member Data Documentation

◆ button

UnityEngine.UI.Button PixelCrushers.DialogueSystem.UnityUIResponseButton.button

The UnityUI button.

◆ defaultColor

Color PixelCrushers.DialogueSystem.UnityUIResponseButton.defaultColor = Color.white

The default color for response text.

◆ label

UnityEngine.UI.Text PixelCrushers.DialogueSystem.UnityUIResponseButton.label

The UnityUI label that will display the response text.

◆ setButtonColor

bool PixelCrushers.DialogueSystem.UnityUIResponseButton.setButtonColor = false

Set true to set the button color when applying emphasis tags.

◆ setLabelColor

bool PixelCrushers.DialogueSystem.UnityUIResponseButton.setLabelColor = true

Set true to set the label color when applying emphasis tags.

Property Documentation

◆ clickable

bool PixelCrushers.DialogueSystem.UnityUIResponseButton.clickable
getset

Indicates whether the button is an allowable response.

true if clickable; otherwise, false.

◆ response

Response PixelCrushers.DialogueSystem.UnityUIResponseButton.response
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.

◆ target

Transform PixelCrushers.DialogueSystem.UnityUIResponseButton.target
getset

Gets or sets the target that will receive click notifications.

The target.

◆ Text

string? PixelCrushers.DialogueSystem.UnityUIResponseButton.Text
getset

Gets or sets the response text.

The text.

◆ visible

bool PixelCrushers.DialogueSystem.UnityUIResponseButton.visible
getset

Indicates whether the button is shown or not.

true if visible; otherwise, false.


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