public CLabel(string text, float width, GUIStyle style = null) { if (style != null) { this.Style = style; } m_content = new GUIContent(CStringUtils.NonNullOrEmpty(text)); Vector2 size = WordWrap(m_content, width); this.Frame = new Rect(0, 0, width, size.y); }
public CLabel(string text = "", GUIStyle style = null) { if (style != null) { this.Style = style; } m_content = new GUIContent(CStringUtils.NonNullOrEmpty(text)); Vector2 size = CalcTextSize(); this.Frame = new Rect(0, 0, size.x, size.y); }
public CHyperlink(string text, string href) { if (text == null) { throw new ArgumentNullException("text"); } if (href == null) { throw new ArgumentNullException("href"); } m_content = new GUIContent(CStringUtils.NonNullOrEmpty(text)); m_href = href; Vector2 size = this.Style.CalcSize(m_content); this.Frame = new Rect(0, 0, size.x, size.y); }