Adventure Creator  1.66.8
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.ButtonDialog Class Reference

Public Member Functions

 ButtonDialog (int[] idArray)
 The default Constructor. More...
 
 ButtonDialog (int _ID, string _label, bool _startEnabled, DialogueOption _dialogueOption, bool _endsConversation)
 A constructor for a scene-based Conversation's dialogue option. More...
 
 ButtonDialog (int _ID, string _label, bool _startEnabled, ActionListAsset _actionListAsset, bool _endsConversation)
 A constructor for an asset-based Conversation's dialogue option. More...
 
 ButtonDialog (int _ID, string _label, bool _isOn)
 A constructor for a runtime-generated Conversation's dialogue option. More...
 
bool CanShow ()
 Checks if the dialogue option can be currently shown. More...
 
bool Upgrade ()
 Upgrades the class to make use of cursorIcon instead of icon as the texture to display More...
 

Public Attributes

string label = "(Not set)"
 
int lineID = -1
 
Texture2D icon
 
CursorIconBase cursorIcon
 
bool isOn
 
bool isLocked
 
ConversationAction conversationAction
 
Conversation newConversation
 
int ID = 0
 
bool isEditing = false
 
bool hasBeenChosen = false
 
bool linkToInventory = false
 
int linkedInventoryID = 0
 
DialogueOption dialogueOption
 
ActionListAsset assetFile = null
 
GameObject customScriptObject = null
 
string customScriptFunction = ""
 

Detailed Description

A data container for a dialogue option within a Conversation.

Constructor & Destructor Documentation

◆ ButtonDialog() [1/4]

AC.ButtonDialog.ButtonDialog ( int []  idArray)

The default Constructor.

Parameters
idArrayAn array of existing ID numbers, so that a unique ID number can be assigned

◆ ButtonDialog() [2/4]

AC.ButtonDialog.ButtonDialog ( int  _ID,
string  _label,
bool  _startEnabled,
DialogueOption  _dialogueOption,
bool  _endsConversation 
)

A constructor for a scene-based Conversation's dialogue option.

Parameters
_IDAn ID number unique to this instance of ButtonDialog within a Conversation
_labelThe option's display text
_startEnabledIf True, the option will be enabled by default
_dialogueOptionThe DialogueOption to run when the option is chosen
_endsConversationIf True, the Conversation will end after the DialogueOption has finished running

◆ ButtonDialog() [3/4]

AC.ButtonDialog.ButtonDialog ( int  _ID,
string  _label,
bool  _startEnabled,
ActionListAsset  _actionListAsset,
bool  _endsConversation 
)

A constructor for an asset-based Conversation's dialogue option.

Parameters
_IDAn ID number unique to this instance of ButtonDialog within a Conversation
_labelThe option's display text
_startEnabledIf True, the option will be enabled by default
_actionListAssetThe ActionListAsset to run when the option is chosen
_endsConversationIf True, the Conversation will end after the ActionListAsset has finished running

◆ ButtonDialog() [4/4]

AC.ButtonDialog.ButtonDialog ( int  _ID,
string  _label,
bool  _isOn 
)

A constructor for a runtime-generated Conversation's dialogue option.

Parameters
_IDAn ID number unique to this instance of ButtonDialog within a Conversation
_labelThe option's display text
_isOnIf True, the option will be enabled

Member Function Documentation

◆ CanShow()

bool AC.ButtonDialog.CanShow ( )

Checks if the dialogue option can be currently shown.

Returns
True if the dialogue option can be currently shown

◆ Upgrade()

bool AC.ButtonDialog.Upgrade ( )

Upgrades the class to make use of cursorIcon instead of icon as the texture to display

Returns
True if the class was upgraded

Member Data Documentation

◆ assetFile

ActionListAsset AC.ButtonDialog.assetFile = null

The ActionListAsset to run, if the Conversation's interactionSource = InteractionSource.AssetFile

◆ conversationAction

ConversationAction AC.ButtonDialog.conversationAction

What happens when the DialogueOption ActionList has finished (ReturnToConversation, Stop, RunOtherConversation)

◆ cursorIcon

CursorIconBase AC.ButtonDialog.cursorIcon

The option's display icon

◆ customScriptFunction

string AC.ButtonDialog.customScriptFunction = ""

The name of the function to run, if the Conversation's interactionSource = InteractionSource.CustomScript

◆ customScriptObject

GameObject AC.ButtonDialog.customScriptObject = null

The GameObject with the custom script to run, if the Conversation's interactionSource = InteractionSource.CustomScript

◆ dialogueOption

DialogueOption AC.ButtonDialog.dialogueOption

The DialogueOption ActionList to run, if the Conversation's interactionSource = InteractionSource.InScene

◆ hasBeenChosen

bool AC.ButtonDialog.hasBeenChosen = false

If True, then the option has been chosen at least once by the player

◆ icon

Texture2D AC.ButtonDialog.icon

Deprecated

◆ ID

int AC.ButtonDialog.ID = 0

An ID number unique to this instance of ButtonDialog within a Conversation

◆ isEditing

bool AC.ButtonDialog.isEditing = false

If True, then the option is currently selected for editing with the Conversation's Inspector

◆ isLocked

bool AC.ButtonDialog.isLocked

If True, the option is locked, and cannot be enabled or disabled

◆ isOn

bool AC.ButtonDialog.isOn

If True, the option is enabled, and will be displayed in a MenuDialogList element

◆ label

string AC.ButtonDialog.label = "(Not set)"

The option's display label

◆ lineID

int AC.ButtonDialog.lineID = -1

The translation ID number of the display label, as set by SpeechManager

◆ linkedInventoryID

int AC.ButtonDialog.linkedInventoryID = 0

The ID number of the associated inventory item, if linkToInventory = True

◆ linkToInventory

bool AC.ButtonDialog.linkToInventory = false

If True, then the option will only be visible if a given inventory item is being carried

◆ newConversation

Conversation AC.ButtonDialog.newConversation

The new Conversation to run, if conversationAction = ConversationAction.RunOtherConversation