Esempio n. 1
0
            public ListItem(BehaviorList ownerList, BehaviorData data, bool canRemove)
            {
                this.CanRemove = canRemove;
                this.OwnerList = ownerList;
                this.Data      = data;
                this.Height    = 16;
                this.Margin    = new Thickness(0, 4, 0, 0);

                this.ColumnDefinitions.Add(20, GridUnitType.Pixel);
                this.ColumnDefinitions.Add(1, GridUnitType.Star);

                if (CanRemove)
                {
                    Skill.Editor.UI.Rectangle redRect = new UI.Rectangle()
                    {
                        Row = 0, Column = 0, ColumnSpan = 2, Color = new Color(1, 0, 0, 0.2f)
                    };
                    this.Controls.Add(redRect);
                }

                _ImgIcon = new Image()
                {
                    Row = 0, Column = 0, Scale = ScaleMode.ScaleToFit, Texture = data.GetIcon()
                };
                this.Controls.Add(_ImgIcon);

                _LblName = new Label()
                {
                    Row = 0, Column = 1
                };
                this.Controls.Add(_LblName);

                UpdateContent();
            }
Esempio n. 2
0
 public TreeViewItem(BehaviorData data)
 {
     this.Data   = data;
     this.Height = 20;
     RefreshContent();
     base.Content.image = Data.GetIcon();
 }
Esempio n. 3
0
 public TreeViewFolder(BehaviorData data)
 {
     this.Data   = data;
     this.Height = 20;
     LoadChildren();
     RefreshContent();
     base.Foldout.Content.image = Data.GetIcon();
 }