Пример #1
0
        public EleButton CreateButton(EleBaseRect parent, Sprite sprite)
        {
            EleButton ele =
                new EleButton(
                    parent,
                    sprite);

            this.ApplyButtonStyle(ele);
            return(ele);
        }
Пример #2
0
        public EleButton CreateButton(string text)
        {
            if (this.head.rect == null)
            {
                return(null);
            }

            EleButton btn = this.uiFactory.CreateButton(this.head.rect, text);

            return(btn);
        }
Пример #3
0
        public EleButton CreateButton(EleBaseRect parent, Sprite sprite, Vector2 size, string name = "")
        {
            EleButton ele =
                new EleButton(
                    parent,
                    sprite,
                    size,
                    name);

            this.ApplyButtonStyle(ele);
            return(ele);
        }
Пример #4
0
        public EleButton CreateButton(EleBaseRect parent)
        {
            EleButton ele =
                new EleButton(
                    parent,
                    this.buttonFont.font,
                    this.buttonFont.fontSize,
                    this.buttonFont.color,
                    null,
                    this.buttonStyle.normalSprite);

            this.ApplyButtonStyle(ele);
            return(ele);
        }
Пример #5
0
        public EleButton PushButton(string text, float proportion, LFlag flags)
        {
            EleButton ret = this.AddButton(text, proportion, flags);

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

            this.stack.Push(this.head);

            this.head = new Entry(ret);
            return(ret);
        }
Пример #6
0
        public EleButton AddButton(string text, float proportion, LFlag flags)
        {
            EleBaseSizer szr = this.head.GetSizer();

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

            EleButton btn = this.uiFactory.CreateButton(this.head.rect, text);

            szr.Add(btn, proportion, flags);
            return(btn);
        }
Пример #7
0
        public EleButton CreateButton(EleBaseRect parent, Vector2 size, string name = "")
        {
            EleButton ele =
                new EleButton(
                    parent,
                    this.buttonFont.font,
                    this.buttonFont.fontSize,
                    this.buttonFont.color,
                    null,
                    this.buttonStyle.normalSprite,
                    size,
                    name);

            this.ApplyButtonStyle(ele);
            return(ele);
        }