예제 #1
0
 public void Start()
 {
     this.host = new PxPre.UIL.EleHost(this.rectTransform, true);
     PxPre.UIL.UILStack stk = new PxPre.UIL.UILStack(this.uiFactory, host);
     stk.PushVertSizer();
     this.scroll = stk.PushVertScrollRect(1.0f, PxPre.UIL.LFlag.Grow);
     stk.PushVertSizer().Chn_Border(10.0f, 0.0f, 10.0f, 0.0f);
     this.message = stk.AddWrapText("Add content to create sim.");
 }
예제 #2
0
        public EleText CreateText(string text, bool wrap)
        {
            if (this.head.rect == null)
            {
                return(null);
            }

            EleText ret = this.uiFactory.CreateText(this.head.rect, text, wrap);

            return(ret);
        }
예제 #3
0
        public EleText CreateText(EleBaseRect parent, string text, bool wrap)
        {
            EleText ele =
                new EleText(
                    parent,
                    text,
                    wrap,
                    this.textTextAttrib.font,
                    this.textTextAttrib.color,
                    this.textTextAttrib.fontSize);

            return(ele);
        }
예제 #4
0
        public EleText AddText(string text, bool wrap, float proportion, LFlag flags)
        {
            EleBaseSizer szr = this.head.GetSizer();

            if (szr == null)
            {
                return(null);
            }

            EleText ret = this.uiFactory.CreateText(this.head.rect, text, wrap);

            szr.Add(ret, proportion, flags);
            return(ret);
        }
예제 #5
0
 public static PxPre.UIL.EleText Chn_FontStyle(this PxPre.UIL.EleText txt, FontStyle style)
 {
     txt.text.fontStyle = style;
     return(txt);
 }
예제 #6
0
 public static PxPre.UIL.EleText Chn_FontSize(this PxPre.UIL.EleText txt, int fontSize)
 {
     txt.text.fontSize = fontSize;
     return(txt);
 }
예제 #7
0
 public static PxPre.UIL.EleText Chn_TextAlignment(this PxPre.UIL.EleText txt, TextAnchor anchor)
 {
     txt.text.alignment = anchor;
     return(txt);
 }
예제 #8
0
 public static PxPre.UIL.EleText Chn_SetColor(this PxPre.UIL.EleText txt, Color c)
 {
     txt.text.color = c;
     return(txt);
 }