Exemple #1
0
        protected override void CreateChildren()
        {
            base.CreateChildren();

            #region Background

            _background = new RectShape
                              {
                                  Id = "background",
                                  Left = 0, Right = 0, Top = 0, Bottom = 0
                              };
            _background.SetStyle("backgroundColor", ColorMixer.FromHex(0x439dde).ToColor());
            AddChild(_background);

            #endregion
            
            #region Content group

            ContentGroup = new Group
            {
                Id = "contentGroup",
                //Left = 6,
                //Right = 6,
                //Top = 50,
                //Bottom = 50
            };
            AddChild(ContentGroup);

            #endregion
        }
        protected override void CreateChildren()
        {
            //Debug.Log("Button skin creating children");
            base.CreateChildren();

            _background = new RectShape
                              {
                                  Left = 0, Right = 0, Top = 0, Bottom = 0
                              };
            _background.SetStyle("backgroundStyle", NumericStepperDecrementButtonStyle.Instance);
            AddChild(_background);
        }
        // ReSharper restore MemberCanBePrivate.Global

        #endregion

        protected override void CreateChildren()
        {
            //Debug.Log("Button skin creating children");
            base.CreateChildren();

            #region Background

            _background = new RectShape
            {
                //Id = "background",
                //Color = (Color)GetStyle("backgroundColor"),
                Left = 0,
                Right = 24,
                Top = 0,
                Bottom = 0
            };
            _background.SetStyle("backgroundStyle", PopupButtonStyle.Instance);
            AddChild(_background);

            #endregion

            #region Arrow button

            _background2 = new RectShape
            {
                Right = 0,
                Top = 0,
                Bottom = 0,
                Width = 25,
                Height = 25
            };
            _background2.SetStyle("backgroundStyle", ArrowButtonStyle.Instance);
            AddChild(_background2);

            #endregion

            //#region Label

            //LabelDisplay = new Label
            //{
            //    HorizontalCenter = 0,
            //    VerticalCenter = 0,
            //    Right = 10,
            //    Left = 10,
            //    Top = 10,
            //    Bottom = 10,
            //    MouseEnabled = false
            //};
            ////LabelDisplay.SetStyle("color", GetStyle("textColor"));
            //AddChild(LabelDisplay);

            //#endregion
        }
Exemple #4
0
        protected override void CreateChildren()
        {
            //Debug.Log("Button skin creating children");
            base.CreateChildren();

            #region Background

            _background = new RectShape
            {
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                BackgroundColor = (Color) GetStyle("backgroundUpColor")
            };
            _background.SetStyle("backgroundStyle", ButtonSingleStateStyle.Instance);
            AddChild(_background);

            #endregion

            #region Shine

            _shine = new RectShape
            {
                Left = 1,
                Right = 1,
                Top = 1,
                Height = GetCurrentShineHeight("up"),
                MouseEnabled = false
            };
            _shine.SetStyle("backgroundStyle", GetShineStyle());
            _shine.BackgroundColor = (Color) GetStyle("shineColor");
            AddChild(_shine);

            #endregion

            VGroup vGroup = new VGroup
            {
                Gap = 10,
                HorizontalAlign = HorizontalAlign.Center,
                VerticalAlign = VerticalAlign.Middle,
                HorizontalCenter = 0,
                VerticalCenter = 0,
                Right = 10,
                Left = 10,
                Top = 10,
                Bottom = 10,
            };
            AddChild(vGroup);

            #region Label

            LabelDisplay = new Label {
                MouseEnabled = false,
                Multiline = true, 
                Color = (Color) GetStyle("labelUpColor")
            };
            vGroup.AddChild(LabelDisplay);

            #endregion

            #region Icon

            IconDisplay = new Image {MouseEnabled = false};
            vGroup.AddChild(IconDisplay);

            #endregion
        }
        protected override void CreateChildren()
        {
            //Debug.Log("Button skin creating children");
            base.CreateChildren();

            #region Background

            _background = new RectShape
                              {
                                  Left = 0,
                                  Right = 0,
                                  Top = 0,
                                  Bottom = 0
                              };
            _background.SetStyle("backgroundStyle", ButtonSingleStateStyle.Instance);
            AddChild(_background);

            //_shine = new RectShape
            //{
            //    Left = 0,
            //    Right = 0,
            //    Top = 0,
            //    Height = GetCurrentShineHeight(),
            //    MouseEnabled = false
            //};
            //_shine.SetStyle("backgroundStyle", ButtonSingleStateStyle.Instance);
            //_shine.Color = (Color) GetStyle("shineColor");
            //AddChild(_shine);

            #endregion

            #region Icon

            IconDisplay = new Image
                              {
                                  HorizontalCenter = 0f,
                                  VerticalCenter = 0f,
                                  MouseEnabled = false
                              };
            AddChild(IconDisplay);

            #endregion
        }
// ReSharper restore MemberCanBePrivate.Global

        #endregion

        protected override void CreateChildren()
        {
            //Debug.Log("Button skin creating children");
            base.CreateChildren();

            #region Background

            _background = new RectShape
            {
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                Alpha = 0.5f
            };
            //_background.SetStyle("backgroundStyle", ButtonStyle.Instance);
            AddChild(_background);

            #endregion

            #region Box

            Group box = new Group
            {
                HorizontalCenter = 0,
                VerticalCenter = 0
            };
            AddChild(box);

            _boxBg = new RectShape
            {
                Left = 0, Right = 0, Top = 0, Bottom = 0,
                HorizontalCenter = 0,
                VerticalCenter = 0,
                /*MinWidth = 300,
                MinHeight = 100*/
            };
            //_background.SetStyle("backgroundStyle", ButtonStyle.Instance);
            _background.SetStyle("backgroundColor", Color.blue);
            box.AddChild(_boxBg);

            #endregion

            HGroup hGroup = new HGroup
            {
                Left = 10, Right = 10, Top = 10, Bottom = 10,
                HorizontalCenter = 0,
                VerticalCenter = 0,
                VerticalAlign = VerticalAlign.Middle
            };
            box.AddChild(hGroup);

            #region Icon

            IconDisplay = new Image {
                MouseEnabled = false
            };
            hGroup.AddChild(IconDisplay);

            #endregion

            #region Label

            LabelDisplay = new Label
                               {
                                   Text = "miki",
                                   MouseEnabled = false,
                                   //Width = 100
                               };
            hGroup.AddChild(LabelDisplay);

            #endregion
        }
        protected override void CreateChildren()
        {
            //Debug.Log("Button skin creating children");
            base.CreateChildren();

            #region Background

            _background = new RectShape
                              {
                                  Left = 0,
                                  Right = 0,
                                  Top = 0,
                                  Bottom = 0
                              };
            _background.SetStyle("backgroundStyle", ButtonSingleStateStyle.Instance);
            AddChild(_background);

            #endregion

            #region Icon

            IconDisplay = new Image
                              {
                                  HorizontalCenter = 0f,
                                  VerticalCenter = 0f,
                                  MouseEnabled = false
                              };
            AddChild(IconDisplay);

            #endregion
        }
Exemple #8
0
        protected override void CreateChildren()
        {
            //Debug.Log("Button skin creating children");
            base.CreateChildren();

            #region Background

            _background = new RectShape
            {
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                BackgroundColor = (Color)GetStyle("backgroundColor")
            };
            _background.SetStyle("backgroundStyle", ButtonSingleStateStyle.Instance);
            AddChild(_background);

            /*_backgroundImage = new Image
                              {
                                  Left = 0,
                                  Right = 0,
                                  Top = 0,
                                  Bottom = 0,
                                  //Visible = false,
                                  ScaleMode = ImageScaleMode.ScaleToFill
                              };
            AddChild(_backgroundImage);*/

            #endregion

            VGroup vGroup = new VGroup
            {
                Gap = 10,
                HorizontalAlign = HorizontalAlign.Center,
                VerticalAlign = VerticalAlign.Middle,
                HorizontalCenter = 0,
                VerticalCenter = 0,
                Right = 10,
                Left = 10,
                Top = 10,
                Bottom = 10,
            };
            AddChild(vGroup);

            #region Icon

            IconDisplay = new Image
            {
                MouseEnabled = false,
                //Visible = false,
                //IncludeInLayout = false
            };
            vGroup.AddChild(IconDisplay);

            #endregion

            #region Label

            LabelDisplay = new Label
            {
                MouseEnabled = false,
                //Visible = false,
                //IncludeInLayout = false
            };
            vGroup.AddChild(LabelDisplay);

            #endregion
        }
        protected override void CreateChildren()
        {
            base.CreateChildren();

            #region Background

            _background = new RectShape { Left = 0, Right = 0, Top = 0, Bottom = 0 };
            _background.SetStyle("backgroundStyle", GetStyle("backgroundStyle"));
            AddChild(_background);

            #endregion

            _group = new Group
            {
                Left = 0, Right = 0, Top = 0, Bottom = 0,
                Layout = GetLayout((bool)GetStyle("vertical"))
            };
            AddChild(_group);

            #region Icon

            IconDisplay = new Image
            {
                MouseEnabled = false
            };
            _group.AddChild(IconDisplay);

            #endregion

            #region Label

            LabelDisplay = new Label();
            _group.AddChild(LabelDisplay);

            #endregion
        }
        protected override void CreateChildren()
        {
            //Debug.Log("Button skin creating children");
            base.CreateChildren();

            #region Background

            _background = new RectShape
            {
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0
            };
            _background.SetStyle("backgroundStyle", ButtonSingleStateStyle.Instance);
            AddChild(_background);

            _backgroundImage = new Image
            {
                //Id = "background_image",
                Left = 1,
                Right = 1,
                Top = 1,
                Bottom = 1,
                //Visible = false,
                Mode = ImageMode.Tiled,
                AdjustWidthToTexture = false,
                AdjustHeightToTexture = false
            };
            AddChild(_backgroundImage);

            #endregion

            #region Icon

            IconDisplay = new Image
            {
                HorizontalCenter = 0f,
                VerticalCenter = 0f,
                MouseEnabled = false
            };
            AddChild(IconDisplay);

            #endregion
        }