Exemple #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;
 }
Exemple #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);
        }
Exemple #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);
 }