Ejemplo n.º 1
0
 public void ChangeCurve(FloatCurve curveToEdit, UIModifierWindow modWin, string tag)
 {
     modifier    = modWin;
     modifierTag = tag;
     Utils.Log($"Started editing curve {curveToEdit.ToString()}", LogType.UI);
     curve  = curveToEdit;
     points = GraphUtils.FloatCurveToPoints(curveToEdit);
     UpdateCurve(out curve);
     showWindow = true;
 }
Ejemplo n.º 2
0
        public UICurveEditWindow(FloatCurve curveToEdit, UIModifierWindow modWin, string tag, bool show) : base(show)
        {
            modifier    = modWin;
            modifierTag = tag;
            Utils.Log($"Started editing curve {curveToEdit.ToString()}", LogType.UI);

            WindowPosition = new Rect(Screen.width / 2, Screen.height / 2, 678, 600);
            curve          = curveToEdit;

            points = GraphUtils.FloatCurveToPoints(curveToEdit);
            UpdateCurve(out curve);
        }
Ejemplo n.º 3
0
 public UICurveEditWindow OpenCurveEditor(FloatCurve toEdit, UIModifierWindow modWin, string tag)
 {
     currentModWinForCurve = modWin;
     currentCurveTag       = tag;
     if (curveEditWindow != null)
     {
         curveEditWindow.ChangeCurve(toEdit, modWin, tag);
     }
     else
     {
         curveEditWindow = new UICurveEditWindow(toEdit, modWin, tag, true);
     }
     return(curveEditWindow);
 }