123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450 |
- using UnityEngine;
- using UnityEngine.TextCore;
- using System;
- namespace TMPro
- {
-
-
-
- public enum TMP_VertexDataUpdateFlags
- {
- None = 0x0,
- Vertices = 0x1,
- Uv0 = 0x2,
- Uv2 = 0x4,
- Uv4 = 0x8,
- Colors32 = 0x10,
- All = 0xFF
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [Serializable]
- public struct VertexGradient
- {
- public Color topLeft;
- public Color topRight;
- public Color bottomLeft;
- public Color bottomRight;
- public VertexGradient (Color color)
- {
- this.topLeft = color;
- this.topRight = color;
- this.bottomLeft = color;
- this.bottomRight = color;
- }
-
-
-
-
-
-
-
- public VertexGradient(Color color0, Color color1, Color color2, Color color3)
- {
- this.topLeft = color0;
- this.topRight = color1;
- this.bottomLeft = color2;
- this.bottomRight = color3;
- }
- }
- public struct TMP_PageInfo
- {
- public int firstCharacterIndex;
- public int lastCharacterIndex;
- public float ascender;
- public float baseLine;
- public float descender;
-
- }
-
-
-
- public struct TMP_LinkInfo
- {
- public TMP_Text textComponent;
- public int hashCode;
- public int linkIdFirstCharacterIndex;
- public int linkIdLength;
- public int linkTextfirstCharacterIndex;
- public int linkTextLength;
- internal char[] linkID;
- internal void SetLinkID(char[] text, int startIndex, int length)
- {
- if (linkID == null || linkID.Length < length) linkID = new char[length];
- for (int i = 0; i < length; i++)
- linkID[i] = text[startIndex + i];
- }
-
-
-
-
-
- public string GetLinkText()
- {
- string text = string.Empty;
- TMP_TextInfo textInfo = textComponent.textInfo;
- for (int i = linkTextfirstCharacterIndex; i < linkTextfirstCharacterIndex + linkTextLength; i++)
- text += textInfo.characterInfo[i].character;
- return text;
- }
-
-
-
-
-
- public string GetLinkID()
- {
- if (textComponent == null)
- return string.Empty;
- return new string(linkID, 0, linkIdLength);
-
- }
- }
-
-
-
- public struct TMP_WordInfo
- {
-
- public TMP_Text textComponent;
- public int firstCharacterIndex;
- public int lastCharacterIndex;
- public int characterCount;
-
-
-
-
-
- public string GetWord()
- {
- string word = string.Empty;
- TMP_CharacterInfo[] charInfo = textComponent.textInfo.characterInfo;
- for (int i = firstCharacterIndex; i < lastCharacterIndex + 1; i++)
- {
- word += charInfo[i].character;
- }
- return word;
- }
- }
- public struct TMP_SpriteInfo
- {
- public int spriteIndex;
- public int characterIndex;
- public int vertexIndex;
- }
-
-
-
-
- public struct Extents
- {
- internal static Extents zero = new Extents(Vector2.zero, Vector2.zero);
- internal static Extents uninitialized = new Extents(new Vector2(32767, 32767), new Vector2(-32767, -32767));
- public Vector2 min;
- public Vector2 max;
- public Extents(Vector2 min, Vector2 max)
- {
- this.min = min;
- this.max = max;
- }
- public override string ToString()
- {
- string s = "Min (" + min.x.ToString("f2") + ", " + min.y.ToString("f2") + ") Max (" + max.x.ToString("f2") + ", " + max.y.ToString("f2") + ")";
- return s;
- }
- }
- [Serializable]
- public struct Mesh_Extents
- {
- public Vector2 min;
- public Vector2 max;
- public Mesh_Extents(Vector2 min, Vector2 max)
- {
- this.min = min;
- this.max = max;
- }
- public override string ToString()
- {
- string s = "Min (" + min.x.ToString("f2") + ", " + min.y.ToString("f2") + ") Max (" + max.x.ToString("f2") + ", " + max.y.ToString("f2") + ")";
-
- return s;
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- public struct WordWrapState
- {
- public int previous_WordBreak;
- public int total_CharacterCount;
- public int visible_CharacterCount;
- public int visible_SpriteCount;
- public int visible_LinkCount;
- public int firstCharacterIndex;
- public int firstVisibleCharacterIndex;
- public int lastCharacterIndex;
- public int lastVisibleCharIndex;
- public int lineNumber;
- public float maxCapHeight;
- public float maxAscender;
- public float maxDescender;
- public float startOfLineAscender;
- public float maxLineAscender;
- public float maxLineDescender;
- public float pageAscender;
- public HorizontalAlignmentOptions horizontalAlignment;
- public float marginLeft;
- public float marginRight;
- public float xAdvance;
- public float preferredWidth;
- public float preferredHeight;
-
- public float previousLineScale;
- public int wordCount;
- public FontStyles fontStyle;
- public int italicAngle;
- public float fontScale;
- public float fontScaleMultiplier;
- public float currentFontSize;
- public float baselineOffset;
- public float lineOffset;
- public bool isDrivenLineSpacing;
- public float glyphHorizontalAdvanceAdjustment;
- public float cSpace;
- public float mSpace;
- public TMP_TextInfo textInfo;
- public TMP_LineInfo lineInfo;
- public Color32 vertexColor;
- public Color32 underlineColor;
- public Color32 strikethroughColor;
- public Color32 highlightColor;
- public TMP_FontStyleStack basicStyleStack;
- public TMP_TextProcessingStack<int> italicAngleStack;
- public TMP_TextProcessingStack<Color32> colorStack;
- public TMP_TextProcessingStack<Color32> underlineColorStack;
- public TMP_TextProcessingStack<Color32> strikethroughColorStack;
- public TMP_TextProcessingStack<Color32> highlightColorStack;
- public TMP_TextProcessingStack<HighlightState> highlightStateStack;
- public TMP_TextProcessingStack<TMP_ColorGradient> colorGradientStack;
- public TMP_TextProcessingStack<float> sizeStack;
- public TMP_TextProcessingStack<float> indentStack;
- public TMP_TextProcessingStack<FontWeight> fontWeightStack;
- public TMP_TextProcessingStack<int> styleStack;
- public TMP_TextProcessingStack<float> baselineStack;
- public TMP_TextProcessingStack<int> actionStack;
- public TMP_TextProcessingStack<MaterialReference> materialReferenceStack;
- public TMP_TextProcessingStack<HorizontalAlignmentOptions> lineJustificationStack;
- public int spriteAnimationID;
- public TMP_FontAsset currentFontAsset;
- public TMP_SpriteAsset currentSpriteAsset;
- public Material currentMaterial;
- public int currentMaterialIndex;
- public Extents meshExtents;
- public bool tagNoParsing;
- public bool isNonBreakingSpace;
- }
-
-
-
- public struct TagAttribute
- {
- public int startIndex;
- public int length;
- public int hashCode;
- }
- public struct RichTextTagAttribute
- {
- public int nameHashCode;
- public int valueHashCode;
- public TagValueType valueType;
- public int valueStartIndex;
- public int valueLength;
- public TagUnitType unitType;
- }
- }
|