Beispiel #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;
        }
Beispiel #2
0
        protected virtual void UpdateSupport()
        {
            if (support == null)
            {
                support = new RTLSupport();
            }

            support.Farsi           = farsi;
            support.PreserveNumbers = preserveNumbers;
            support.FixTextTags     = fixTags;
        }
Beispiel #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());
        }
Beispiel #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);
        }
Beispiel #5
0
        protected virtual void Update()
        {
            if (havePropertiesChanged)
            {
                if (support == null)
                {
                    support = new RTLSupport();
                }

                UpdateSupport();
                UpdateText();
            }
        }
Beispiel #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);
        }
Beispiel #7
0
 protected override void Awake()
 {
     base.Awake();
     support = new RTLSupport();
     UpdateSupport();
 }