// 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
            };
            AddChild(_background);

            #endregion

            #region Label

            LabelDisplay = new Label
            {
                HorizontalCenter = 0,
                VerticalCenter = 0,
                Right = 10,
                Left = 10,
                Top = 10,
                Bottom = 10,
                MouseEnabled = false
            };
            AddChild(LabelDisplay);

            #endregion
        }
Beispiel #2
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
        }
Beispiel #3
0
        // ReSharper restore MemberCanBePrivate.Global

        #endregion

        protected override void CreateChildren()
        {
            base.CreateChildren();

            #region Background

            _background = new RectShape
            {
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                Alpha = 0.5f
            };
            AddChild(_background);

            #endregion

            #region Box

            _box = new RectShape
            {
                MinWidth = 300,
                MinHeight = 100,
                HorizontalCenter = 0,
                VerticalCenter = 0
            };
            AddChild(_box);

            #endregion

            HGroup hGroup = new HGroup
            {
                HorizontalCenter = 0,
                VerticalCenter = 0
            };
            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();

            _background = new RectShape
                              {
                                  Left = 0, Right = 0, Top = 0, Bottom = 0
                              };
            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
        }
        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);
        }
        protected override void CreateChildren()
        {
            base.CreateChildren();

            RectShape background = new RectShape();
            //background.SetStyle();
            background.Left = background.Right = background.Top = background.Bottom = 0;
            AddChild(background);

            // ReSharper disable InconsistentNaming
            ContentGroup = new Group {Layout = new AbsoluteLayout()};
            // ReSharper restore InconsistentNaming
            ContentGroup.Left = ContentGroup.Right = ContentGroup.Top = ContentGroup.Bottom = 0;
            AddChild(ContentGroup);
        }
        protected override void CreateChildren()
        {
            base.CreateChildren();

            /**
             * Frame does not need to measure itself, and its size will always be explicitely set
             * */
            _frame = new RectShape {Width = 50, Height = 50, FocusEnabled = false};
            AddChild(_frame);

            /**
             * Label will measure itself, depending of text
             * */
            _label = new Label();
            AddChild(_label);
        }
Beispiel #9
0
        protected override void CreateChildren()
        {
            base.CreateChildren();

            _display = new RectShape { PercentWidth = 100, Height = 150 };
            AddChild(_display);

            HGroup hGroup = new HGroup { Gap = 10, PercentHeight = 100 };
            AddChild(hGroup);

            _red = new VSlider
            {
                SkinClass = typeof(VSliderSkin2),
                Width = 50,
                PercentHeight = 100, Maximum = 255/*, BoolExample = true*/
            };
            _red.Change += ChangeHandler;
            hGroup.AddChild(_red);

            _green = new VSlider
            {
                SkinClass = typeof(VSliderSkin2),
                PercentHeight = 100,
                Width = 50,
                Maximum = 255
            };
            _green.Change += ChangeHandler;
            hGroup.AddChild(_green);

            _blue = new VSlider
            {
                SkinClass = typeof(VSliderSkin2),
                Width = 50,
                PercentHeight = 100,
                Maximum = 255
            };
            _blue.Change += ChangeHandler;
            hGroup.AddChild(_blue);
        }
        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
        }
Beispiel #11
0
        protected override void CreateChildren()
        {
            base.CreateChildren();

            #region Background

            _background = new RectShape
            {
                Id = "background",
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0
            };
            AddChild(_background);

            #endregion

            #region Border

            _border = new RectShape
            {
                Id = "overlay",
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                MouseEnabled = false
            };
            AddChild(_border);

            #endregion

            #region Header background

            _headerBackground = new RectShape
            {
                Id = "headerBackground",
                //Color = (Color?)GetStyle("headerBackgroundColor"),
                Left = 1,
                Right = 1,
                Top = 1,
                Height = 50
            };
            AddChild(_headerBackground);

            #endregion

            #region Header group

            HeaderGroup = new Group
            {
                Id = "headerGroup",
                Layout = new AbsoluteLayout(),
                Left = 1,
                Right = 1,
                Top = 1,
                Height = 50,
                MouseEnabled = true
            };
            AddChild(HeaderGroup);

            #endregion

            #region Icon + label group

            _labelGroup = new HGroup
            {
                Left = 10,
                VerticalCenter = 0,
                Gap = 6,
                VerticalAlign = VerticalAlign.Middle,
                ClipAndEnableScrolling = true
            };
            HeaderGroup.AddChild(_labelGroup);

            #endregion

            #region Icon display

            HeaderIconDisplay = new Image();
            _labelGroup.AddChild(HeaderIconDisplay);

            #endregion

            #region Label display

            TitleDisplay = new Label();
            _labelGroup.AddChild(TitleDisplay);

            #endregion

            #region Move area

            MoveArea = new Group
            {
                Id = "move_area",
                Layout = new AbsoluteLayout(),
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                MouseEnabled = true
            };
            HeaderGroup.AddChild(MoveArea);

            #endregion

            #region Tools

            ToolGroup = new Group
            {
                Id = "toolGroup",
                Layout = new HorizontalLayout
                {
                    HorizontalAlign = HorizontalAlign.Right,
                    VerticalAlign = VerticalAlign.Middle,
                    Gap = 4
                },
                Right = 6,
                VerticalCenter = 0,
                MouseEnabled = true // not draggable when clicking space between buttons --- false // to be draggable on possible tools label click
            };
            HeaderGroup.AddChild(ToolGroup);

            #endregion

            #region Content background

            _contentGroupBackground = new RectShape
            {
                Id = "contentGroupBackground",
                //Color = Color.white,
                Left = 6,
                Right = 6,
                Top = 50,
                Bottom = 50
            };
            AddChild(_contentGroupBackground);

            #endregion

            #region Scroller

            _scroller = new Scroller
            {
                Left = 6,
                Right = 6,
                Top = 50,
                Bottom = 50
            };
            AddChild(_scroller);

            #endregion

            #region Content group

            ContentGroup = new HGroup
            {
                Id = "contentGroup",
                Gap = 10,
                PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 10,
                HorizontalAlign = HorizontalAlign.Center,
                VerticalAlign = VerticalAlign.Middle
            };
            AddChild(ContentGroup);
            _scroller.Viewport = ContentGroup;

            #endregion

            #region Icon

            IconDisplay = new Image();
            ContentGroup.AddChild(IconDisplay);

            #endregion

            #region Message display

            MessageDisplay = new Label {
                Multiline = true, 
                MaxWidth = 800,
                MaxHeight = 600,
                Color = Color.black,
            };
            MessageDisplay.SetStyle("labelStyle", GetStyle("labelStyle"));
            MessageDisplay.SetStyle("font", GetStyle("labelFont"));
            ContentGroup.AddChild(MessageDisplay);

            #endregion

            #region Control bar background

            _controlBarBackground = new RectShape
            {
                Id = "controlBarBackground",
                Left = 1,
                Right = 1,
                Bottom = 1,
                Height = 50,
                Alpha = 0.5f,
                MouseEnabled = false
            };
            AddChild(_controlBarBackground);

            #endregion

            #region Control bar

            ControlBarGroup = new Group
            {
                Id = "controlBar",
                //ClipAndEnableScrolling = true, // this introduces a child positioning bug
                Layout = new HorizontalLayout
                {
                    HorizontalAlign = HorizontalAlign.Right,
                    VerticalAlign = VerticalAlign.Bottom,
                    Gap = 4,
                    PaddingLeft = 6,
                    PaddingRight = 6,
                    PaddingTop = 6,
                    PaddingBottom = 6
                },
                ClipAndEnableScrolling = true,
                Left = 1,
                Right = 1,
                Bottom = 1,
                Height = 50,
                MouseEnabled = true // not draggable when clicking space between buttons --- false // to be draggable on possible tools label click
            };
            AddChild(ControlBarGroup);

            #endregion

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

            _rect = new RectShape();
            AddChild(_rect);

            _hgroup = new HGroup { VerticalAlign = VerticalAlign.Middle, PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 10 };
            AddChild(_hgroup);

            if (null == FirstNameLabel)
            {
                FirstNameLabel = new Label
                {
                    Width = 80
                };
                _hgroup.AddChild(FirstNameLabel);
            }

            if (null == LastNameLabel)
            {
                LastNameLabel = new Label
                {
                    Width = 80
                };
                _hgroup.AddChild(LastNameLabel);
            }

            if (null == AgeLabel)
            {
                AgeLabel = new Label
                {
                    Width = 20
                };
                _hgroup.AddChild(AgeLabel);
            }

            if (null == NsAge)
            {
                NsAge = new NumericStepper { Width = 60, FocusEnabled = false };
                NsAge.ValueCommit += delegate
                {
                    // update item
                    ExampleItem item = (ExampleItem)Data;
                    item.Age = (int)NsAge.Value;
                };
                _hgroup.AddChild(NsAge);
            }

            if (null == ChkDrivingLicense)
            {
                ChkDrivingLicense = new CheckBox { FocusEnabled = false };
                ChkDrivingLicense.Change += delegate
                {
                    // update item
                    ExampleItem item = (ExampleItem)Data;
                    item.DrivingLicense = ChkDrivingLicense.Selected;
                };
                _hgroup.AddChild(ChkDrivingLicense);
            }

            _hgroup.AddChild(new Spacer { PercentWidth = 100 });

            if (null == _buttonInfo)
            {
                _buttonInfo = new Button { 
                    Text = "Info", 
                    FocusEnabled = false,
                    SkinClass = typeof(ImageButtonSkin),
                    Icon = ImageLoader.Instance.Load("Icons/information")
                };
                _buttonInfo.Click += delegate
                {
                    DispatchEvent(new Event(ADD_BUTTON_CLICKED, true)); // bubbles
                };
                _hgroup.AddChild(_buttonInfo);
            }

            if (null == _buttonEdit)
            {
                _buttonEdit = new Button
                {
                    Text = "Edit",
                    FocusEnabled = false,
                    SkinClass = typeof(ImageButtonSkin),
                    Icon = ImageLoader.Instance.Load("Icons/edit")
                };
                _buttonEdit.Click += delegate
                {
                    DispatchEvent(new Event(EDIT_BUTTON_CLICKED, true)); // bubbles
                };
                _hgroup.AddChild(_buttonEdit);
            }

            if (null == _buttonRemove)
            {
                _buttonRemove = new Button
                {
                    Text = "Remove",
                    FocusEnabled = false,
                    SkinClass = typeof(ImageButtonSkin),
                    Icon = ImageLoader.Instance.Load("Icons/cancel")
                };
                _buttonRemove.ButtonDown += delegate
                                                {
                                                    var parentList = Owner as List;
                                                    if (null != parentList)
                                                    {
                                                        //Debug.Log("Removing at " + parentList.DataProvider.GetItemIndex(Data));
                                                        parentList.DataProvider.RemoveItemAt(parentList.DataProvider.GetItemIndex(Data));
                                                    }
                                                    else
                                                        Debug.LogError("Owner of item renderer is not a list");
                                                };
                _hgroup.AddChild(_buttonRemove);
            }
        }
Beispiel #13
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
        }
Beispiel #14
0
        // ReSharper restore MemberCanBePrivate.Global

        #endregion

        protected override void CreateChildren()
        {
            base.CreateChildren();

            #region Background

            _background = new RectShape
                              {
                                  Id = "background",
                                  Color = Color.white,
                                  Left = 0, Right = 0, Top = 0, Bottom = 0
                              };
            AddChild(_background);

            _backgroundImage = new Image
                                   {
                                       //Id = "background_image",
                                       Left = 0,
                                       Right = 0,
                                       Top = 0,
                                       Bottom = 0,
                                       Visible = false,
                                       //Rotation = 30,
                                       //AspectRatio = 4,
                                       ScaleMode = ImageScaleMode.ScaleToFill
                                   };
            AddChild(_backgroundImage);

            #endregion

            #region Header background

            _headerBackground = new RectShape
                                    {
                                        Id = "headerBackground",
                                        //Color = RgbColor.FromHex(0x000fff).ToColor(),
                                        BackgroundColor = (Color) GetStyle("headerBackgroundColor"),
                                        Left = 0,
                                        Right = 0,
                                        Top = 0,
                                        Height = 80
                                    };
            AddChild(_headerBackground);

            #endregion

            #region Header group

            HeaderGroup = new Group
                              {
                                  Id = "headerGroup",
                                  Layout = new AbsoluteLayout(),
                                  Left = 0,
                                  Right = 0,
                                  Top = 0,
                                  Height = 80
                              };
            AddChild(HeaderGroup);

            #endregion

            #region Title label

            TitleDisplay = new Label
                             {
                                 Id = "titleLabel",
                                 Left = 10,
                                 VerticalCenter = 0
                             };
            //TitleLabel.SetStyle("textColor", UnityEngine.Color.white);
            HeaderGroup.AddChild(TitleDisplay);

            #endregion

            #region Tools

            ToolGroup = new Group
                            {
                                Id = "toolGroup",
                                Layout = new HorizontalLayout {
                                                                  HorizontalAlign = HorizontalAlign.Right,
                                                                  VerticalAlign = VerticalAlign.Middle,
                                                                  Gap = 4
                                                              },
                                Right = 6,
                                VerticalCenter = 0,
                                MouseEnabled = true // not draggable when clicking space between buttons --- false // to be draggable on possible tools label click
                            };
            HeaderGroup.AddChild(ToolGroup);

            #endregion

            #region Scroller

            _scroller = new Scroller
            {
                SkinClass = EvaluateSkinClassFromStyle("scrollerSkin"),
                Left = 0,
                Right = 0,
                Top = 80,
                Bottom = 50
            };
            AddChild(_scroller);

            #endregion

            #region Content group

            ContentGroup = new Group { Id = "contentGroup" };
            //AddChild(ContentGroup);
            _scroller.Viewport = ContentGroup;

            #endregion

            #region Control bar background

            _controlBarBackground = new RectShape
                                        {
                                            Id = "controlBarBackground",
                                            BackgroundColor = ColorMixer.FromHex(0x000fff).ToColor(),
                                            Left = 0,
                                            Right = 0,
                                            Bottom = 0,
                                            Height = 50,
                                            //Alpha = 0.5f
                                        };
            AddChild(_controlBarBackground);

            #endregion

            #region Control bar

            ControlBarGroup = new Group
                                  {
                                      Id = "controlBar",
                                      Layout = new HorizontalLayout
                                                   {
                                                       HorizontalAlign = HorizontalAlign.Right,
                                                       VerticalAlign = VerticalAlign.Middle,
                                                       Gap = 4,
                                                       PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 10
                                                   },
                                      Left = 0,
                                      Right = 0,
                                      Bottom = 0,
                                      Height = 50,
                                      MouseEnabled = true // not draggable when clicking space between buttons --- false // to be draggable on possible tools label click
                                  };
            AddChild(ControlBarGroup);

            #endregion

            #region Border

            _border = new RectShape
            {
                Id = "border",
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                MouseEnabled = false
            };
            AddChild(_border);

            #endregion

        }
Beispiel #15
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
            };
            _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
        }
Beispiel #16
0
// ReSharper restore MemberCanBePrivate.Global

        #endregion

        protected override void CreateChildren()
        {
            base.CreateChildren();

            #region Background

            _background = new RectShape
                              {
                                  Id = "background",
                                  Left = 0, Right = 0, Top = 0, Bottom = 0
                              };
            AddChild(_background);

            #endregion

            #region Border

            _border = new RectShape
            {
                Id = "overlay",
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                MouseEnabled = false
            };
            AddChild(_border);

            #region Header background

            _headerBackground = new RectShape
                                    {
                                        Id = "headerBackground",
                                        Left = 1, Right = 1, Top = 1,
                                        Height = 50
                                    };
            AddChild(_headerBackground);

            #endregion

            #region Header group

            HeaderGroup = new Group
                              {
                                  Id = "headerGroup",
                                  Layout = new AbsoluteLayout(),
                                  Left = 1,
                                  Right = 1,
                                  Top = 1,
                                  Height = 50,
                                  MouseEnabled = true
                              };
            AddChild(HeaderGroup);

            #endregion

            #region Icon + label group

            _labelGroup = new HGroup
                                {
                                    Left = 10,
                                    VerticalCenter = 0,
                                    Gap = 6,
                                    VerticalAlign = VerticalAlign.Middle,
                                    ClipAndEnableScrolling = true
                                };
            HeaderGroup.AddChild(_labelGroup);

            #endregion

            #region Icon display

            HeaderIconDisplay = new Image
            {
                /*Left = 10,
                VerticalCenter = 0*/
            };
            _labelGroup.AddChild(HeaderIconDisplay);

            #endregion

            #region Label display

            TitleDisplay = new Label
                             {
                                 //Id = "titleLabel",
                                 //Left = 10,
                                 //VerticalCenter = 0
                             };
            //TitleLabel.SetStyle("textColor", UnityEngine.Color.white);
            _labelGroup.AddChild(TitleDisplay);

            #endregion

            #region Move area

            MoveArea = new Group
            {
                Id = "move_area",
                Layout = new AbsoluteLayout(),
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                MouseEnabled = true
            };
            HeaderGroup.AddChild(MoveArea);

            #endregion

            #region Tools

            ToolGroup = new Group
                            {
                                Id = "toolGroup",
                                Layout = new HorizontalLayout {
                                                                  HorizontalAlign = HorizontalAlign.Right,
                                                                  VerticalAlign = VerticalAlign.Middle,
                                                                  Gap = 4
                                                              },
                                Right = 6,
                                VerticalCenter = 0,
                                MouseEnabled = true // not draggable when clicking space between buttons --- false // to be draggable on possible tools label click
                            };
            HeaderGroup.AddChild(ToolGroup);

            #endregion

            #region Content background

            _contentGroupBackground = new RectShape
                                          {
                                              Id = "contentGroupBackground",
                                              Left = 6,
                                              Right = 6,
                                              Top = 50,
                                              Bottom = 50
                                          };
            AddChild(_contentGroupBackground);

            #endregion

            #region Scroller

            _scroller = new Scroller
            {
                Left = 6,
                Right = 6,
                Top = 50,
                Bottom = 50
            };
            AddChild(_scroller);

            #endregion

            #region Content group

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

            /**
             * Panel: in designer, children not focusable (textarea)
             * Problem je bio u WindowSkinu:
             * ContentGroup = new Group{ Id = "contentGroup" };
             * AddChild(ContentGroup); // -> ova linija radi problem (ako se izbaci, sve je ok)
             * _scroller.Viewport = ContentGroup;
             * */

            // AddChild(ContentGroup);
            _scroller.Viewport = ContentGroup;

            #endregion

            #region Control bar background

            _controlBarBackground = new RectShape
                                        {
                                            Id = "controlBarBackground",
                                            Left = 1,
                                            Right = 1,
                                            Bottom = 1,
                                            Height = 50,
                                            Alpha = 0.5f,
                                            MouseEnabled = false
                                        };
            AddChild(_controlBarBackground);

            #endregion

            #region Control bar

            ControlBarGroup = new Group
            {
                Id = "controlBar",
                ClipAndEnableScrolling = true,
                Layout = new HorizontalLayout
                {
                    HorizontalAlign = HorizontalAlign.Right,
                    VerticalAlign = VerticalAlign.Middle,
                    Gap = 4,
                    PaddingLeft = 6,
                    PaddingRight = 6,
                    PaddingTop = 6,
                    PaddingBottom = 6
                },
                Left = 1,
                Right = 1,
                Bottom = 1,
                Height = 50,
                MouseEnabled = true
            };
            AddChild(ControlBarGroup);

            #endregion

            #endregion
        }
Beispiel #17
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
        }
Beispiel #18
0
// 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
        }
Beispiel #19
0
        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()
        {
            base.CreateChildren();

            _rect = new RectShape(); //{ Left = 0, Right = 0, Top = 0, Bottom = 0 //};
            AddChild(_rect);

            _hGroup = new HGroup
            {
                PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 10, Gap = 10
            };
            AddChild(_hGroup);

            // left group
            VGroup vGroup = new VGroup
            {
                VerticalAlign = VerticalAlign.Middle,
                Gap = 10,
                PercentWidth = 100,
                PercentHeight = 100
            };
            _hGroup.AddChild(vGroup);

            _image = new Image
            {
                Styles = ButtonStyles
            };
            _image.MouseDown += delegate
            {
                DispatchEvent(new Event("showImage", true)); // bubbling event
            };
            vGroup.AddChild(_image);

            LabelDisplay = new Label
            {
                Width = 150
            };
            //vGroup.AddChild(LabelDisplay);
            if (_text != string.Empty)
                LabelDisplay.Text = _text;

            // right group
            vGroup = new VGroup
            {
                VerticalAlign = VerticalAlign.Middle, Gap = 10, PercentWidth = 100, PercentHeight = 100
            };
            _hGroup.AddChild(vGroup);

            if (null == _buttonShow)
            {
                _buttonShow = new Button { 
                    Text = "Show", 
                    PercentWidth = 100,
                    FocusEnabled = false,
                    SkinClass = typeof(ImageButtonSkin),
                    Styles = ButtonStyles,
                    Icon = ImageLoader.Instance.Load("Icons/accept")
                };
                _buttonShow.ButtonDown += delegate
                {
                    DispatchEvent(new Event("showImage", true)); // bubbling!
                };
                vGroup.AddChild(_buttonShow);
            }

            if (null == _buttonRemove)
            {
                _buttonRemove = new Button
                {
                    Text = "Remove",
                    PercentWidth = 100,
                    FocusEnabled = false,
                    SkinClass = typeof(ImageButtonSkin),
                    Styles = ButtonStyles,
                    Icon = ImageLoader.Instance.Load("Icons/cancel")
                };
                _buttonRemove.ButtonDown += delegate
                                                {
                                                    var parentList = Owner as List;
                                                    if (null != parentList)
                                                    {
                                                        //Debug.Log("Removing at " + parentList.DataProvider.GetItemIndex(Data));
                                                        parentList.DataProvider.RemoveItemAt(parentList.DataProvider.GetItemIndex(Data));
                                                    }
                                                    else
                                                        Debug.LogError("Owner of item renderer is not a list");
                                                };
                vGroup.AddChild(_buttonRemove);
            }
        }
Beispiel #21
0
// 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 = 0, Top = 0, Bottom = 0
                              };
            //_background.SetStyle("backgroundStyle", ButtonStyle.Instance);
            AddChild(_background);

            #endregion

            #region Label

            LabelDisplay = new Label
                               {
                                   HorizontalCenter = 0,
                                   VerticalCenter = 0,
                                   Right = 10,
                                   Left = 10,
                                   Top = 10,
                                   Bottom = 10,
                                   MouseEnabled = false
                               };
            AddChild(LabelDisplay);

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

            #region Popup anchor

            _anchor = new PopUpAnchor
            {
                Id = "pop_up",
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                PopupPosition = PopupPosition.Below,
                PopupWidthMatchesAnchorWidth = true
            };
            AddChild(_anchor);

            #endregion

            #region DropDown

            DropDown = new Group
            {
                Id = "drop_down",
                MaxHeight = 134, MinHeight = 22,
                Width = 150
            };
            //AddChild(DropDown);
            _anchor.Popup = DropDown;

            #endregion

            #region Background

            _background = new RectShape
            {
                Id = "background",
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0
            };
            DropDown.AddChild(_background);

            #endregion

            #region Scroller

            _scroller = new Scroller
            {
                Id = "scroller",
                SkinClass = EvaluateSkinClassFromStyle("scrollerSkin"),
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                MinViewportInset = 1,
                HasFocusableChildren = false,
                Height = 100
            };
            DropDown.AddChild(_scroller);

            #endregion
            
            #region Data group

            DataGroup = new DataGroup
            {
                Id = "data_group",
                ItemRenderer = new ItemRendererFactory<DefaultItemRenderer>(),
                Layout = new VerticalLayout
                {
                    Gap = 0,
                    HorizontalAlign = HorizontalAlign.ContentJustify,
                    RequestedMinRowCount = 5
                }
            };
            _scroller.Viewport = DataGroup;

            #endregion

            #region Border

            _border = new RectShape
            {
                Id = "border",
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                MouseEnabled = false
            };
            DropDown.AddChild(_border);

            #endregion

            #region OpenButton

            OpenButton = new Button
            {
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                FocusEnabled = false,
                SkinClass = typeof(DropDownListButtonSkin)
            };
            AddChild(OpenButton);

            #endregion
            
            #region Label

            LabelDisplay = new Label
            {
                VerticalCenter = 0,
                Left = 7,
                Right = 32,
                Top = 2,
                Bottom = 2,
                Width = 75,
                MouseEnabled = false,
                Color = Color.black
            };
            //LabelDisplay.SetStyle("color", GetStyle("textColor"));
            AddChild(LabelDisplay);

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

            _rect = new RectShape();
                                 //{
                                 //    Left = 0, Right = 0, Top = 0, Bottom = 0
                                 //};
            AddChild(_rect);

            if (null == LabelDisplay)
            {
                LabelDisplay = new Label();
                AddChild(LabelDisplay);
                if (_text != string.Empty)
                    LabelDisplay.Text = _text;
            }
        }
Beispiel #24
0
        // ReSharper restore MemberCanBePrivate.Global

        #endregion

        protected override void CreateChildren()
        {
            base.CreateChildren();

            #region Background

            _background = new RectShape
            {
                Id = "background",
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0
            };
            AddChild(_background);

            #endregion

            #region Border

            _border = new RectShape
            {
                Id = "border",
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                MouseEnabled = false
            };
            AddChild(_border);

            #endregion

            #region Scroller

            _scroller = new Scroller
            {
                Id = "scroller",
                SkinClass = EvaluateSkinClassFromStyle("scrollerSkin"),
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                MinViewportInset = 1,
                HasFocusableChildren = false
            };
            AddChild(_scroller);

            #endregion

            #region Data group

            DataGroup = new DataGroup
            {
                Id = "data_group",
                ItemRenderer = new ItemRendererFactory<DefaultItemRenderer>(),
                Layout = new VerticalLayout
                             {
                                 Gap = 0, HorizontalAlign = HorizontalAlign.ContentJustify, RequestedMinRowCount = 5
                             }
            };
            //AddChild(DataGroup);
            _scroller.Viewport = DataGroup;

            #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
        }
Beispiel #26
0
        protected override void CreateChildren()
        {
            base.CreateChildren();

            /*#region Background

            _background = new RectShape
                              {
                                  Id = "background",
                                  Left = 0,
                                  Right = 0,
                                  Top = 0,
                                  Bottom = 0
                              };
            AddChild(_background);

            #endregion*/

            #region Background image

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

            #endregion

            #region Border

            _border = new RectShape
                          {
                              Id = "overlay",
                              Left = 0,
                              Right = 0,
                              Top = 0,
                              Bottom = 0,
                              MouseEnabled = false
                          };
            AddChild(_border);

            #endregion

            #region Header background

            _headerBackground = new RectShape
                                    {
                                        Id = "headerBackground",
                                        Left = 1,
                                        Right = 1,
                                        Top = 1,
                                        Height = 50
                                    };
            AddChild(_headerBackground);

            #endregion

            #region Header group

            HeaderGroup = new Group
                              {
                                  Id = "headerGroup",
                                  Layout = new AbsoluteLayout(),
                                  Left = 1,
                                  Right = 1,
                                  Top = 1,
                                  Height = 50,
                                  MouseEnabled = true
                              };
            AddChild(HeaderGroup);

            #endregion

            #region Icon + label group

            _labelGroup = new HGroup
                                {
                                    Left = 10,
                                    VerticalCenter = 0,
                                    Gap = 6,
                                    VerticalAlign = VerticalAlign.Middle,
                                    ClipAndEnableScrolling = true
                                };
            HeaderGroup.AddChild(_labelGroup);

            #endregion

            #region Icon display

            HeaderIconDisplay = new Image();
            _labelGroup.AddChild(HeaderIconDisplay);

            #endregion

            #region Label display

            TitleDisplay = new Label();
            _labelGroup.AddChild(TitleDisplay);

            #endregion

            #region Move area

            MoveArea = new Group
                           {
                               Id = "move_area",
                               Layout = new AbsoluteLayout(),
                               Left = 0,
                               Right = 0,
                               Top = 0,
                               Bottom = 0,
                               MouseEnabled = true
                           };
            HeaderGroup.AddChild(MoveArea);

            #endregion

            #region Tools

            ToolGroup = new Group
                            {
                                Id = "toolGroup",
                                Layout = new HorizontalLayout
                                             {
                                                 HorizontalAlign = HorizontalAlign.Right,
                                                 VerticalAlign = VerticalAlign.Middle,
                                                 Gap = 4
                                             },
                                Right = 6,
                                VerticalCenter = 0,
                                MouseEnabled = true // not draggable when clicking space between buttons --- false // to be draggable on possible tools label click
                            };
            HeaderGroup.AddChild(ToolGroup);

            #endregion

            #region Content background

            _contentGroupBackground = new RectShape
                                          {
                                              Id = "contentGroupBackground",
                                              //Color = Color.white,
                                              Left = 6,
                                              Right = 6,
                                              Top = 50,
                                              Bottom = 50
                                          };
            AddChild(_contentGroupBackground);

            #endregion

            #region Scroller

            _scroller = new Scroller
                            {
                                Left = 6,
                                Right = 6,
                                Top = 50,
                                Bottom = 50
                            };
            AddChild(_scroller);

            #endregion

            #region Content group

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

            #endregion

            #region Control bar background

            _controlBarBackground = new RectShape
                                        {
                                            Id = "controlBarBackground",
                                            Left = 1,
                                            Right = 1,
                                            Bottom = 1,
                                            Height = 50,
                                            Alpha = 0.5f,
                                            MouseEnabled = false
                                        };
            AddChild(_controlBarBackground);

            #endregion

            #region Control bar

            ControlBarGroup = new Group
                                  {
                                      Id = "controlBar",
                                      ClipAndEnableScrolling = true,
                                      Layout = new HorizontalLayout
                                                   {
                                                       HorizontalAlign = HorizontalAlign.Right,
                                                       VerticalAlign = VerticalAlign.Bottom,
                                                       Gap = 4,
                                                       PaddingLeft = 6,
                                                       PaddingRight = 6,
                                                       PaddingTop = 6,
                                                       PaddingBottom = 6
                                                   },
                                      Left = 1,
                                      Right = 1,
                                      Bottom = 1,
                                      Height = 50,
                                      MouseEnabled = true
                                  };
            AddChild(ControlBarGroup);

            #endregion

        }
Beispiel #27
0
// ReSharper restore MemberCanBePrivate.Global

        #endregion

        protected override void CreateChildren()
        {
            base.CreateChildren();

            #region Background

            _background = new RectShape
                              {
                                  Id = "background",
                                  Left = 0, Right = 0, Top = 0, Bottom = 0
                              };
            AddChild(_background);

            #endregion

            #region Border

            _border = new RectShape
            {
                Id = "border",
                Left = 0,
                Right = 0,
                Top = 0,
                Bottom = 0,
                MouseEnabled = false
            };
            AddChild(_border);

            #endregion

            #region Header background

            _headerBackground = new RectShape
                                    {
                                        Id = "headerBackground",
                                        //Color = (Color?)GetStyle("headerBackgroundColor"),
                                        Left = 1, Right = 1, Top = 1,
                                        Height = 50
                                    };
            AddChild(_headerBackground);

            #endregion

            #region Header group

            HeaderGroup = new Group
                              {
                                  Id = "headerGroup",
                                  Layout = new AbsoluteLayout(),
                                  Left = 1,
                                  Right = 1,
                                  Top = 1,
                                  Height = 50
                              };
            AddChild(HeaderGroup);

            #endregion

            #region Icon + label group

            HGroup hgroup = new HGroup
            {
                Left = 10,
                VerticalCenter = 0,
                Gap = 6,
                VerticalAlign = VerticalAlign.Middle
            };
            HeaderGroup.AddChild(hgroup);

            #endregion

            #region Icon display

            HeaderIconDisplay = new Image
            {
                //Id = "titleLabel",
                //Text = "miki!",
                Left = 10,
                VerticalCenter = 0
            };
            hgroup.AddChild(HeaderIconDisplay);

            #endregion

            #region Title label

            TitleDisplay = new Label
                             {
                                 //Id = "titleLabel",
                                 Left = 10,
                                 VerticalCenter = 0
                             };
            //TitleLabel.SetStyle("textColor", UnityEngine.Color.white);
            hgroup.AddChild(TitleDisplay);

            #endregion

            #region Tools

            ToolGroup = new Group
                            {
                                Id = "toolGroup",
                                Layout = new HorizontalLayout {
                                                                  HorizontalAlign = HorizontalAlign.Right,
                                                                  VerticalAlign = VerticalAlign.Middle,
                                                                  Gap = 4
                                                              },
                                Right = 6,
                                VerticalCenter = 0,
                                MouseEnabled = true // not draggable when clicking space between buttons --- false // to be draggable on possible tools label click
                            };
            HeaderGroup.AddChild(ToolGroup);

            #endregion

            #region Content background

            _contentGroupBackground = new RectShape
                                          {
                                              Left = 6,
                                              Right = 6,
                                              Top = 50,
                                              Bottom = 50
                                          };
            AddChild(_contentGroupBackground);

            #endregion

            #region Scroller

            _scroller = new Scroller
                                    {
                                        SkinClass = EvaluateSkinClassFromStyle("scrollerSkin"),
                                        Left = 6,
                                        Right = 6,
                                        Top = 50,
                                        Bottom = 50
                                    };
            AddChild(_scroller);

            #endregion

            #region Content group

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

            #endregion

            #region Control bar background

            _controlBarBackground = new RectShape
                                        {
                                            Id = "controlBarBackground",
                                            Left = 1,
                                            Right = 1,
                                            Bottom = 1,
                                            Height = 50,
                                            Alpha = 0.5f // note: alpha!
                                        };
            AddChild(_controlBarBackground);

            #endregion

            #region Control bar

            ControlBarGroup = new Group
                                  {
                                      Id = "controlBar",
                                      Layout = new HorizontalLayout
                                                   {
                                                       HorizontalAlign = HorizontalAlign.Right,
                                                       VerticalAlign = VerticalAlign.Middle,
                                                       Gap = 4,
                                                       PaddingLeft = 6, PaddingRight = 6, PaddingTop = 6, PaddingBottom = 6
                                                   },
                                      Left = 1,
                                      Right = 1,
                                      Bottom = 1,
                                      Height = 50,
                                      MouseEnabled = true // not draggable when clicking space between buttons --- false // to be draggable on possible tools label click
                                  };
            AddChild(ControlBarGroup);

            #endregion

        }
Beispiel #28
0
        protected override void CreateChildren()
        {
            base.CreateChildren();

            _rect = new RectShape();
            //{
            //    Left = 0, Right = 0, Top = 0, Bottom = 0
            //};
            AddChild(_rect);

            _hgroup = new HGroup { VerticalAlign = VerticalAlign.Middle, PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 10 };
            AddChild(_hgroup);

            if (null == LabelDisplay)
            {
                LabelDisplay = new Label
                {
                    PercentWidth = 100
                };
                _hgroup.AddChild(LabelDisplay);
                if (_text != string.Empty)
                    LabelDisplay.Text = _text;
            }

            _hgroup.AddChild(new Spacer { PercentWidth = 100 });

            if (null == _buttonAdd)
            {
                _buttonAdd = new Button { 
                    Text = "Info", 
                    FocusEnabled = false,
                    SkinClass = typeof(ImageButtonSkin),
                    Icon = ImageLoader.Instance.Load("Icons/information")
                };
                _buttonAdd.ButtonDown += delegate
                {
                    DispatchEvent(new Event(ADD_BUTTON_CLICKED, true)); // bubbles
                };
                _hgroup.AddChild(_buttonAdd);
            }

            if (null == _buttonRemove)
            {
                _buttonRemove = new Button
                {
                    Text = "Remove",
                    FocusEnabled = false,
                    SkinClass = typeof(ImageButtonSkin),
                    Icon = ImageLoader.Instance.Load("Icons/cancel")
                };
                _buttonRemove.ButtonDown += delegate
                                                {
                                                    var parentList = Owner as List;
                                                    if (null != parentList)
                                                    {
                                                        //Debug.Log("Removing at " + parentList.DataProvider.GetItemIndex(Data));
                                                        parentList.DataProvider.RemoveItemAt(parentList.DataProvider.GetItemIndex(Data));
                                                    }
                                                    else
                                                        Debug.LogError("Owner of item renderer is not a list");
                                                };
                _hgroup.AddChild(_buttonRemove);
            }
        }