Exemple #1
0
 public void DestroyPoint(CurveEditorPoint point)
 {
     if (points.Count > 1)
     {
         points.Remove(point);
     }
 }
Exemple #2
0
        public CurveEditorPoint CreatePoint(Vector2 position = new Vector2())
        {
            var point = new CurveEditorPoint(this, _colors)
            {
                position = position
            };

            points.Add(point);
            return(point);
        }
Exemple #3
0
        public void SetSelectedPoint(CurveEditorPoint point)
        {
            if (_selectedPoint != null)
            {
                _selectedPoint.showHandles = false;
                _selectedPoint             = null;
            }

            if (point != null)
            {
                point.showHandles = true;
                _selectedPoint    = point;
            }
        }
Exemple #4
0
        public void SetSelectedPoint(CurveEditorPoint point)
        {
            foreach (var line in _lines)
            {
                line.SetSelectedPoint(null);
            }

            if (point != null)
            {
                _lines.Remove(point.parent);
                _lines.Add(point.parent);

                point.parent.SetSelectedPoint(point);
            }

            selectedPoint = point;
            SetVerticesDirty();
        }