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; }
protected virtual void UpdateSupport() { if (support == null) { support = new RTLSupport(); } support.Farsi = farsi; support.PreserveNumbers = preserveNumbers; support.FixTextTags = fixTags; }
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()); }
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); }
protected virtual void Update() { if (havePropertiesChanged) { if (support == null) { support = new RTLSupport(); } UpdateSupport(); UpdateText(); } }
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); }
protected override void Awake() { base.Awake(); support = new RTLSupport(); UpdateSupport(); }