Пример #1
0
 public void AddObject(BTBLib.Node value)
 {
     if (!_objectsToDraw.Contains(value))
     {
         _objectsToDraw.Add(value);
     }
 }
Пример #2
0
 private void SetSelectedObject(BTBLib.Node value)
 {
     if (_selectedObject != value)
     {
         _selectedObject = value;
         Redraw();
     }
 }
Пример #3
0
 private void SetHighlightedObject(BTBLib.Node value)
 {
     if (_highlightedObject != value)
     {
         _highlightedObject = value;
         Redraw();
     }
 }
Пример #4
0
        private void UpdateTreeViewObjects()
        {
            TreeNode objectsNode = GetObjectsNode();

            foreach (TreeNode node in objectsNode.Nodes)
            {
                TagData     tagData = node.Tag as TagData;
                BTBLib.Node obj     = tagData.GetObjectLink();
                node.Checked = _drawData.ContainsObject(obj);
            }
        }
Пример #5
0
        private void DrawObject(Graphics graphics, Color color, bool fill, BTBLib.Node obj)
        {
            Pen pen = new Pen(color, 2.0f / _zoom);

            float radius = obj.Radius;
            float size   = radius * 2;
            int   div    = 8;

            if (fill)
            {
                Brush brush = new SolidBrush(Color.FromArgb(128, color.R, color.G, color.B));
                graphics.FillEllipse(brush, (obj.X - radius) / div, (_battle.Height - obj.Y - radius) / div, size / div, size / div);
            }

            graphics.DrawEllipse(pen, (obj.X - radius) / div, (_battle.Height - obj.Y - radius) / div, size / div, size / div);
        }
Пример #6
0
 public void SetData(BTBLib.Node node)
 {
     _node = node;
     UpdateUI();
 }
Пример #7
0
 public bool ContainsObject(BTBLib.Node value)
 {
     return(_objectsToDraw.Contains(value));
 }