Example #1
0
        public virtual void UpdateText()
        {
            if (support == null)
            {
                support = new RTLSupport();
            }

            if (originalText == null)
            {
                originalText = "";
            }

            if (ForceFix == false && support.IsRTLInput(originalText) == false)
            {
                isRightToLeftText = false;
                base.text         = originalText;
            }
            else
            {
                isRightToLeftText = true;
                base.text         = GetFixedText(originalText);
            }

            havePropertiesChanged = true;
        }
Example #2
0
        protected virtual void UpdateSupport()
        {
            if (support == null)
            {
                support = new RTLSupport();
            }

            support.Farsi           = farsi;
            support.PreserveNumbers = preserveNumbers;
            support.FixTextTags     = fixTags;
        }
Example #3
0
        private string GetFixedText(string input)
        {
            if (string.IsNullOrEmpty(input))
            {
                return(input);
            }

            finalText.Clear();
            RTLSupport.FixRTL(input, finalText, farsi, fixTags, preserveNumbers);
            finalText.Reverse();
            return(finalText.ToString());
        }
Example #4
0
        private string GetFixedText(string input)
        {
            if (string.IsNullOrEmpty(input))
            {
                return(input);
            }

            input = RTLSupport.FixRTL(input, fixTags, preserveNumbers, farsi);
            input = input.Reverse().ToArray().ArrayToString();

            return(input);
        }
Example #5
0
        protected virtual void Update()
        {
            if (havePropertiesChanged)
            {
                if (support == null)
                {
                    support = new RTLSupport();
                }

                UpdateSupport();
                UpdateText();
            }
        }
Example #6
0
        public virtual string GetFixedText(string input)
        {
            if (string.IsNullOrEmpty(input))
            {
                return(input);
            }

            if (support == null)
            {
                support = new RTLSupport();
            }

            input = support.FixRTL(input);
            input = input.Reverse().ToArray().ArrayToString();

            return(input);
        }
Example #7
0
 protected override void Awake()
 {
     base.Awake();
     support = new RTLSupport();
     UpdateSupport();
 }