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

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

            if (point != null)
            {
                point.showHandles = true;
                _selectedPoint    = point;
            }
        }
Beispiel #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();
        }