public void AddObject(BTBLib.Node value) { if (!_objectsToDraw.Contains(value)) { _objectsToDraw.Add(value); } }
private void SetSelectedObject(BTBLib.Node value) { if (_selectedObject != value) { _selectedObject = value; Redraw(); } }
private void SetHighlightedObject(BTBLib.Node value) { if (_highlightedObject != value) { _highlightedObject = value; Redraw(); } }
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); } }
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); }
public void SetData(BTBLib.Node node) { _node = node; UpdateUI(); }
public bool ContainsObject(BTBLib.Node value) { return(_objectsToDraw.Contains(value)); }