示例#1
0
        /// <inheritdoc />
        protected override void OnTooltipTrigger(JEMTextTooltipData data)
        {
            string targetText;

            if (!string.IsNullOrEmpty(data.LocaleKey))
            {
                targetText = JEMLocale.Resolve(data.LocaleGroup, data.LocaleKey.ToUpper());
                targetText = targetText.Replace(@"\t", "\t");
            }
            else
            {
                targetText = data.Text;
            }

            TextReference.text = targetText;
        }
示例#2
0
        /// <inheritdoc />
        public override void RefreshLocale()
        {
            // Construct.
            var product = string.Empty;

            if (JEMLocale.GetSelectedLocale() != null)
            {
                product  = AutoStart;
                product += JEMLocale.Resolve(Group, Key, AutoFormat);
                product += AutoEnd;
            }

            if (ToUpper)
            {
                product = product.ToUpper();
            }

            // Apply.
            Apply(product);
        }
示例#3
0
 /// <summary>
 ///     Gets name of this character from current locale.
 /// </summary>
 public string GetLocaleName()
 {
     return(JEMLocale.Resolve(GameVar.LocaleFileCharacter, $"{LocaleName}_NAME"));
 }