Adventure Creator  1.75.0
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2019
AC.PopUpLabelData Class Reference
Inheritance diagram for AC.PopUpLabelData:
AC.ITranslatable

Public Member Functions

 PopUpLabelData (int[] idArray, string[] existingLabels, int _lineID)
 
void ShowGUI (bool canEdit, Object objectToRecord)
 
string[] GenerateEditorPopUpLabels ()
 
string GetValue (int index)
 Gets a label value More...
 
bool CanTranslate ()
 Gets if the data can be translated More...
 
string GetPopUpsString ()
 Gets all Popup values combined into a single string More...
 
string GetTranslatableString (int index)
 Gets the text to be translated, given its index. More...
 
int GetTranslationID (int index)
 Gets the translation ID of a given text index. More...
 
void UpdateTranslatableString (int index, string updatedText)
 
int GetNumTranslatables ()
 Gets the maximum number of possible translatable texts. More...
 
bool HasExistingTranslation (int index)
 Checks if a given text index has already been assigned a unique translation ID. More...
 
void SetTranslationID (int index, int _lineID)
 Sets the translation ID of a given text index More...
 
string GetOwner (int index)
 Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element. More...
 
bool OwnerIsPlayer (int index)
 Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line. More...
 
AC_TextType GetTranslationType (int index)
 Gets the translation type of a given text index. More...
 
bool CanTranslate (int index)
 Checks if a given text index can and should be translated. More...
 

Static Public Attributes

const int MaxPresets = 50
 

Protected Attributes

string editorLabel = ""
 
int id = 1
 
string[] labels = new string[0]
 
int lineID = -1
 
bool canTranslate = false
 

Properties

string EditorLabel [get]
 
int ID [get]
 
int Length [get]
 
int LineID [get]
 
string[] Labels [get]
 

Detailed Description

A data container for PopUp labels that are shared amongst multiple variables.

Constructor & Destructor Documentation

◆ PopUpLabelData()

AC.PopUpLabelData.PopUpLabelData ( int[]  idArray,
string[]  existingLabels,
int  _lineID 
)

The default Constructor

Member Function Documentation

◆ CanTranslate() [1/2]

bool AC.PopUpLabelData.CanTranslate ( )

Gets if the data can be translated

Returns
True if the data can be translated

◆ CanTranslate() [2/2]

bool AC.PopUpLabelData.CanTranslate ( int  index)

Checks if a given text index can and should be translated.

Parameters
indexThe index of the translatable text
Returns
True if the text can and should be translated

Implements AC.ITranslatable.

◆ GetNumTranslatables()

int AC.PopUpLabelData.GetNumTranslatables ( )

Gets the maximum number of possible translatable texts.

Returns
The maximum number of possible translatable texts.

Implements AC.ITranslatable.

◆ GetOwner()

string AC.PopUpLabelData.GetOwner ( int  index)

Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element.

Parameters
indexThe index of the translatable text
Returns
The name of the translatable text's owner.

Implements AC.ITranslatable.

◆ GetPopUpsString()

string AC.PopUpLabelData.GetPopUpsString ( )

Gets all Popup values combined into a single string

Returns
All Popup values combined into a single string

◆ GetTranslatableString()

string AC.PopUpLabelData.GetTranslatableString ( int  index)

Gets the text to be translated, given its index.

Parameters
indexThe index of the translatable text
Returns
The text to be translated

Implements AC.ITranslatable.

◆ GetTranslationID()

int AC.PopUpLabelData.GetTranslationID ( int  index)

Gets the translation ID of a given text index.

Parameters
indexThe index of the translatable text
Returns
The translation ID of the text

Implements AC.ITranslatable.

◆ GetTranslationType()

AC_TextType AC.PopUpLabelData.GetTranslationType ( int  index)

Gets the translation type of a given text index.

Parameters
indexThe index of the translatable text
Returns
The translation type of a given text index.

Implements AC.ITranslatable.

◆ GetValue()

string AC.PopUpLabelData.GetValue ( int  index)

Gets a label value

Parameters
indexThe label's index number
Returns
The label

◆ HasExistingTranslation()

bool AC.PopUpLabelData.HasExistingTranslation ( int  index)

Checks if a given text index has already been assigned a unique translation ID.

Parameters
indexThe index of the translatable text
Returns
True if the text has been assigned a unique translation ID

Implements AC.ITranslatable.

◆ OwnerIsPlayer()

bool AC.PopUpLabelData.OwnerIsPlayer ( int  index)

Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line.

Parameters
indexThe index of the translatable text
Returns
True if the translatable text's owner is a Player.

Implements AC.ITranslatable.

◆ SetTranslationID()

void AC.PopUpLabelData.SetTranslationID ( int  index,
int  lineID 
)

Sets the translation ID of a given text index

Parameters
indexThe index of the translatable text
lineIDThe new translation ID to assign the translatable text

Implements AC.ITranslatable.

Property Documentation

◆ ID

int AC.PopUpLabelData.ID
get

A unique identifier

◆ Labels

string [] AC.PopUpLabelData.Labels
get

An array of the labels

◆ Length

int AC.PopUpLabelData.Length
get

How many labels are defined

◆ LineID

int AC.PopUpLabelData.LineID
get

The translation ID, as recorded by the Speech Manager