123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- using System;
- using UnityEngine;
- namespace TMPro
- {
-
-
-
- [Serializable]
- public class TMP_SpriteCharacter : TMP_TextElement
- {
-
-
-
- public string name
- {
- get { return m_Name; }
- set
- {
- if (value == m_Name)
- return;
- m_Name = value;
- m_HashCode = TMP_TextParsingUtilities.GetHashCodeCaseSensitive(m_Name);
- }
- }
-
-
-
-
- public int hashCode { get { return m_HashCode; } }
-
-
-
- [SerializeField]
- private string m_Name;
- [SerializeField]
- private int m_HashCode;
-
-
-
-
-
-
- public TMP_SpriteCharacter()
- {
- m_ElementType = TextElementType.Sprite;
- }
-
-
-
-
-
- public TMP_SpriteCharacter(uint unicode, TMP_SpriteGlyph glyph)
- {
- m_ElementType = TextElementType.Sprite;
- this.unicode = unicode;
- this.glyphIndex = glyph.index;
- this.glyph = glyph;
- this.scale = 1.0f;
- }
-
-
-
-
-
-
- public TMP_SpriteCharacter(uint unicode, TMP_SpriteAsset spriteAsset, TMP_SpriteGlyph glyph)
- {
- m_ElementType = TextElementType.Sprite;
- this.unicode = unicode;
- this.textAsset = spriteAsset;
- this.glyph = glyph;
- this.glyphIndex = glyph.index;
- this.scale = 1.0f;
- }
-
-
-
-
-
- internal TMP_SpriteCharacter(uint unicode, uint glyphIndex)
- {
- m_ElementType = TextElementType.Sprite;
- this.unicode = unicode;
- this.textAsset = null;
- this.glyph = null;
- this.glyphIndex = glyphIndex;
- this.scale = 1.0f;
- }
- }
- }
|