PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton Class Reference

An NGUI response button for use with NGUIDialogueUIControls. More...

Inheritance diagram for PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton:
Collaboration diagram for PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton:

Public Member Functions

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

UIButton nguiButton
 The NGUI button. More...
 
UILabel nguiLabel
 The NGUI label that will display the response text. More...
 
Color defaultColor = Color.white
 The default color for response text. More...
 
bool setButtonColor = true
 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

An NGUI response button for use with NGUIDialogueUIControls.

Add this component to every response button in the dialogue UI. The button should have, at minimum, a label and a collider. A background sprite is optional.

Member Function Documentation

◆ OnClick()

void PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.OnClick ( )

Handles a button click by calling the response handler.

◆ Reset()

void PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.Reset ( )

Clears the button.

◆ SetColor()

virtual void PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.SetColor ( Color  currentColor)
protectedvirtual

◆ SetFormattedText()

void PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.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.NGUI.NGUIResponseButton.SetUnformattedText ( string  unformattedText)

Sets the button's text using plain text.

Parameters
unformattedTextUnformatted text for the button label.

Member Data Documentation

◆ defaultColor

Color PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.defaultColor = Color.white

The default color for response text.

◆ nguiButton

UIButton PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.nguiButton

The NGUI button.

◆ nguiLabel

UILabel PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.nguiLabel

The NGUI label that will display the response text.

◆ setButtonColor

bool PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.setButtonColor = true

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

◆ setLabelColor

bool PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.setLabelColor = true

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

Property Documentation

◆ clickable

bool PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.clickable
getset

Indicates whether the button is an allowable response.

true if clickable; otherwise, false.

◆ response

Response PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.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.NGUI.NGUIResponseButton.target
getset

Gets or sets the target that will receive click notifications.

The target.

◆ Text

string? PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.Text
getset

Gets or sets the response text.

The text.

◆ visible

bool PixelCrushers.DialogueSystem.NGUI.NGUIResponseButton.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: