Adventure Creator  1.66.8
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.ITranslatable Interface Reference
Inheritance diagram for AC.ITranslatable:
AC.ActionCharRename AC.ActionDialogOptionRename AC.ActionMenuState AC.ActionRename AC.ActionSpeech AC.ActionVarSet AC.Char AC.Conversation AC.CursorIcon AC.CustomTranslatableExample AC.Document AC.GVar AC.Hotspot AC.HotspotPrefix AC.InvItem AC.LocalVariables AC.MenuButton AC.MenuCycle AC.MenuDrag AC.MenuInput AC.MenuJournal AC.MenuLabel AC.MenuSavesList AC.MenuSlider AC.MenuToggle

Public Member Functions

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...
 
int GetNumTranslatables ()
 Gets the maximum number of possible translatable texts. More...
 
bool CanTranslate (int index)
 Checks if a given text index can and should be translated. 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 ()
 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 ()
 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...
 

Detailed Description

An interface for any component that has translatable strings.

Member Function Documentation

◆ CanTranslate()

bool AC.ITranslatable.CanTranslate ( int  index)

◆ GetNumTranslatables()

◆ GetOwner()

string AC.ITranslatable.GetOwner ( )

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.

Returns
The name of the translatable text's owner.

Implemented in AC.Char, AC.Hotspot, AC.MenuSavesList, AC.MenuJournal, AC.HotspotPrefix, AC.ActionVarSet, AC.GVar, AC.MenuSlider, AC.MenuButton, AC.Conversation, AC.MenuLabel, AC.MenuCycle, AC.InvItem, AC.MenuToggle, AC.ActionMenuState, AC.ActionSpeech, AC.MenuInput, AC.MenuDrag, AC.Document, AC.LocalVariables, AC.ActionDialogOptionRename, AC.CursorIcon, AC.ActionCharRename, AC.ActionRename, and AC.CustomTranslatableExample.

◆ GetTranslatableString()

string AC.ITranslatable.GetTranslatableString ( int  index)

◆ GetTranslationID()

int AC.ITranslatable.GetTranslationID ( int  index)

◆ GetTranslationType()

AC_TextType AC.ITranslatable.GetTranslationType ( int  index)

◆ HasExistingTranslation()

bool AC.ITranslatable.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

Implemented in AC.Char, AC.Hotspot, AC.MenuSavesList, AC.MenuJournal, AC.HotspotPrefix, AC.ActionVarSet, AC.MenuSlider, AC.GVar, AC.Conversation, AC.MenuLabel, AC.MenuButton, AC.MenuCycle, AC.InvItem, AC.MenuToggle, AC.ActionMenuState, AC.ActionSpeech, AC.MenuInput, AC.MenuDrag, AC.Document, AC.LocalVariables, AC.ActionDialogOptionRename, AC.InvVar, AC.CursorIcon, AC.ActionCharRename, AC.ActionRename, and AC.CustomTranslatableExample.

◆ OwnerIsPlayer()

bool AC.ITranslatable.OwnerIsPlayer ( )

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.

Returns
True if the translatable text's owner is a Player.

Implemented in AC.Char, AC.Hotspot, AC.MenuSavesList, AC.MenuJournal, AC.HotspotPrefix, AC.ActionVarSet, AC.GVar, AC.MenuSlider, AC.MenuButton, AC.Conversation, AC.MenuLabel, AC.MenuCycle, AC.InvItem, AC.MenuToggle, AC.ActionSpeech, AC.ActionMenuState, AC.MenuInput, AC.MenuDrag, AC.Document, AC.LocalVariables, AC.ActionDialogOptionRename, AC.CursorIcon, AC.ActionCharRename, AC.ActionRename, and AC.CustomTranslatableExample.

◆ SetTranslationID()

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