private void UpdateLayout() { if (this == null) { return; } // Debug.Log("ug " + parameter.fontname); if (parameter.Fontname.Length > 4) { if (Is3D()) { if (null != m_fontInfo) { m_fontInfo.LayoutText3D(this, RenderText); } } else { // use common fontinfo VFontInfo fi = VFontHash.GetFontInfo(parameter.Fontname); if (null != fi) { fi.LayoutText3D(this, RenderText); } } } }
private void UpdateGlyphs() { clearChildren(); if (parameter.Fontname.Length > 4) { if (Is3D()) { if (null == m_fontInfo) { m_fontInfo = new VFontInfo(parameter.Fontname); } m_fontInfo.CreateText3D(this, RenderText); } else { // use common fontinfo VFontInfo fi = VFontHash.GetFontInfo(parameter.Fontname); fi.CreateText3D(this, RenderText); } if (null != m_changeListener) { foreach (MonoBehaviour mb in m_changeListener) { mb.SendMessage("VTextChanged"); } } } }
private void UpdateGlyphs(bool updateGeometry = false) { if (this == null) { return; } clearChildren(); if (parameter.Fontname.Length > 4) { if (Is3D()) { if (null == m_fontInfo) { m_fontInfo = new VFontInfo(parameter.Fontname); } if (null == m_fontInfo) { Debug.Log("Null fontinfo"); } else { m_fontInfo.SetQuality(parameter.Quality); m_fontInfo.CreateText3D(this, RenderText); } } else { // use common fontinfo if (!updateGeometry) { VFontInfo fi = VFontHash.GetFontInfo(parameter.Fontname); fi.SetQuality(parameter.Quality); fi.CreateText3D(this, RenderText); } else { // Debug.Log("Update geo"); // VFontInfo fi = VFontHash.GetFontInfo(parameter.Fontname); if (null == m_fontInfo) { m_fontInfo = new VFontInfo(parameter.Fontname); } if (null == m_fontInfo) { Debug.Log("Null fontinfo"); } else { m_fontInfo.SetQuality(parameter.Quality); m_fontInfo.CreateText3D(this, RenderText); } } } if (null != m_changeListener) { foreach (MonoBehaviour mb in m_changeListener) { mb.SendMessage("VTextChanged"); } } } }