Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }