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

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

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