/// <summary> /// /// </summary> void Start() { Text text = GetComponent <Text>(); if (text) { luaTextLocalizeFunc = LuaState.main.getFunction("resmng.LangText"); if (luaTextLocalizeFunc != null) { text.text = (string)luaTextLocalizeFunc.call(langTextID); } FontOverride fo = fontOverride[(int)XRegion.GetLanguageType()]; if (fo.size > 0) { text.fontSize = fo.size; XTextStyleComponent textStyle = GetComponent <XTextStyleComponent>(); if (textStyle) { textStyle.applySize = false; } } } }
public XTextStyleSheetObject.StyleData Get() { if (string.IsNullOrEmpty(style)) { XTextStyleComponent textStyle = transform.parent.GetComponentInParent <XTextStyleComponent>(); if (textStyle == null) { return(null); } return(textStyle.Get()); } return(XTextStyleManager.Instance.Get(style)); }