![]() |
Adventure Creator
1.77.3
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
CursorIcon () | |
CursorIcon (CursorIcon cursorIcon) | |
CursorIcon (int[] idArray) | |
A Constructor that generates a unique id number. More... | |
override void | ClearCache () |
void | UpdateLabel (int languageNumber) |
string | GetLabel (int languageNumber) |
Gets the icon's display name. More... | |
string | GetButtonName () |
Gets the name of the expected input button that is used to quick-select the cursor (only applies if SettingsManager's interactionMethod is ChooseInteractionThenHotspot). More... | |
void | Copy (CursorIcon _cursorIcon, bool includeTranslation) |
Copies the values from another CursorIcon. 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... | |
AC_TextType | GetTranslationType (int index) |
Gets the translation type 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... | |
bool | CanTranslate (int index) |
Checks if a given text index can and should be translated. More... | |
![]() | |
CursorIconBase () | |
void | Copy (CursorIconBase _icon) |
Copies the values from another CursorIconBase. More... | |
void | DrawAsInteraction (Rect _rect, bool isActive) |
Draws the graphic as part of a Menu, for when it's displayed within a MenuGraphic or MenuInteraction. More... | |
UnityEngine.Sprite | GetSprite () |
Gets a Sprite based on the texture supplied. The Sprite will be generated on the fly if it does not already exist. More... | |
UnityEngine.Sprite | GetAnimatedSprite (int _frameIndex) |
Gets a Sprite based on the animated texture supplied. The Sprite will be generated on the fly if it does not already exist. More... | |
UnityEngine.Sprite | GetAnimatedSprite (bool isActive) |
Gets a Sprite based on the animated texture supplied, when the texture is used within a MenuElement (MenuGraphic or MenuInteraction). The Sprite will be generated on the fly if it does not already exist. More... | |
void | ReplaceTexture (Texture newTexture) |
Replaces the icon's texture, and also clears internal caches. More... | |
void | ClearSprites () |
Texture2D | GetAnimatedTexture (bool canAnimate=true) |
Gets a slice of the texture that represents the current frame, if the texture consists of animated frames. More... | |
string | GetName () |
Gets a unique identifier, based on the texture and current animation frame. More... | |
Texture | Draw (Vector2 centre, bool canAnimate=true) |
Draws the texture as a cursor icon More... | |
Rect | GetAnimatedRect () |
Gets a Rect that describes a slice of the animated texture that represents the current frame. More... | |
Rect | GetAnimatedRect (int _frameIndex) |
Gets a Rect that describes a slice of the animated texture that represents a specific frame. More... | |
void | Reset () |
void | ShowGUI (bool includeSize, bool includeAlwaysAnimate=true, string _label="Texture:", CursorRendering cursorRendering=CursorRendering.Software, string apiPrefix="", string tooltip="") |
Public Attributes | |
bool | dontCycle = false |
string | label |
int | lineID = -1 |
int | id |
![]() | |
Texture | texture |
bool | isAnimated = false |
int | numFrames = 1 |
int | numRows = 1 |
int | numCols = 1 |
float | size = 0.015f |
float | animSpeed = 4f |
bool | endAnimOnLastFrame = false |
bool | skipFirstFrameWhenLooping = false |
Vector2 | clickOffset |
float[] | frameSpeeds |
bool | alwaysAnimate = false |
A data container for interaction cursor icons. These are stored in CursorManager.
AC.CursorIcon.CursorIcon | ( | ) |
The default Constructor.
AC.CursorIcon.CursorIcon | ( | int[] | idArray | ) |
A Constructor that generates a unique id number.
idArray | An array of previously-assigned id numbers |
bool AC.CursorIcon.CanTranslate | ( | int | index | ) |
Checks if a given text index can and should be translated.
index | The index of the translatable text |
Implements AC.ITranslatable.
|
virtual |
Clears the animated Texture2D and Sprite caches.
Reimplemented from AC.CursorIconBase.
void AC.CursorIcon.Copy | ( | CursorIcon | _cursorIcon, |
bool | includeTranslation | ||
) |
Copies the values from another CursorIcon.
_cursorIcon | The CursorIcon to copy from |
includeTranslations | If True, then translation data will also be copied |
string AC.CursorIcon.GetButtonName | ( | ) |
Gets the name of the expected input button that is used to quick-select the cursor (only applies if SettingsManager's interactionMethod is ChooseInteractionThenHotspot).
string AC.CursorIcon.GetLabel | ( | int | languageNumber | ) |
Gets the icon's display name.
languageNumber | The index of the current language, as set in SpeechManager |
int AC.CursorIcon.GetNumTranslatables | ( | ) |
Gets the maximum number of possible translatable texts.
Implements AC.ITranslatable.
string AC.CursorIcon.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.
index | The index of the translatable text |
Implements AC.ITranslatable.
string AC.CursorIcon.GetTranslatableString | ( | int | index | ) |
Gets the text to be translated, given its index.
index | The index of the translatable text |
Implements AC.ITranslatable.
int AC.CursorIcon.GetTranslationID | ( | int | index | ) |
Gets the translation ID of a given text index.
index | The index of the translatable text |
Implements AC.ITranslatable.
AC_TextType AC.CursorIcon.GetTranslationType | ( | int | index | ) |
Gets the translation type of a given text index.
index | The index of the translatable text |
Implements AC.ITranslatable.
bool AC.CursorIcon.HasExistingTranslation | ( | int | index | ) |
Checks if a given text index has already been assigned a unique translation ID.
index | The index of the translatable text |
Implements AC.ITranslatable.
bool AC.CursorIcon.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.
index | The index of the translatable text |
Implements AC.ITranslatable.
void AC.CursorIcon.SetTranslationID | ( | int | index, |
int | lineID | ||
) |
Sets the translation ID of a given text index
index | The index of the translatable text |
lineID | The new translation ID to assign the translatable text |
Implements AC.ITranslatable.
bool AC.CursorIcon.dontCycle = false |
If True, then the cursor will be left out of the cycle when right-clicking (only applies if SettingsManager's interactionMethod is ChooseInteractionThenHotspot)
int AC.CursorIcon.id |
A unique identifier
string AC.CursorIcon.label |
The display name of the icon
int AC.CursorIcon.lineID = -1 |
The translation ID, as used by SpeechManager