Ejemplo n.º 1
0
 public UILightFloatModifierWindow(EffectLightFloatModifier mod, bool show) : base((EffectModifier)mod, show)
 {
     floatMod           = mod;
     floatNames         = new string[] { "Intensity", "Range", "SpotAngle" };
     floatIndex         = floatNames.ToList().FindIndex(x => x == floatMod.floatName);
     floatCurveFunction = new CurveUpdateFunction(UpdateFloatCurve);
     GenerateCurveThumbs(mod);
 }
Ejemplo n.º 2
0
 public UIFloatModifierWindow(EffectFloatModifier mod, bool show) : base((EffectModifier)mod, show)
 {
     floatMod           = mod;
     floatNames         = MaterialUtils.FindValidShaderProperties(floatMod.GetMaterial(), WaterfallMaterialPropertyType.Float).ToArray();
     floatIndex         = floatNames.ToList().FindIndex(x => x == floatMod.floatName);
     floatCurveFunction = new CurveUpdateFunction(UpdateFloatCurve);
     GenerateCurveThumbs(mod);
 }
Ejemplo n.º 3
0
 public UIRotationModifierWindow(EffectRotationModifier mod, bool show) : base((EffectModifier)mod, show)
 {
     rotMod         = mod;
     xCurveFunction = new CurveUpdateFunction(UpdateXCurve);
     yCurveFunction = new CurveUpdateFunction(UpdateYCurve);
     zCurveFunction = new CurveUpdateFunction(UpdateZCurve);
     GenerateCurveThumbs(mod);
 }
Ejemplo n.º 4
0
 public void ChangeCurve(FloatCurve curveToEdit, CurveUpdateFunction curveFun)
 {
     curveUpdateFun = curveFun;
     Utils.Log($"Started editing curve {curveToEdit.ToString()}", LogType.UI);
     curve  = curveToEdit;
     points = GraphUtils.FloatCurveToPoints(curveToEdit);
     UpdateCurve(out curve);
     showWindow = true;
 }
 public UILightColorModifierWindow(EffectLightColorModifier mod, bool show) : base((EffectModifier)mod, show)
 {
     colorMod       = mod;
     rCurveFunction = new CurveUpdateFunction(UpdateRedCurve);
     gCurveFunction = new CurveUpdateFunction(UpdateGreenCurve);
     bCurveFunction = new CurveUpdateFunction(UpdateBlueCurve);
     aCurveFunction = new CurveUpdateFunction(UpdateAlphaCurve);
     GenerateCurveThumbs(mod);
 }
Ejemplo n.º 6
0
        public UICurveEditWindow(FloatCurve curveToEdit, CurveUpdateFunction curveFun, bool show) : base(show)
        {
            curveUpdateFun = curveFun;
            Utils.Log($"Started editing curve {curveToEdit.ToString()}");

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

            points = GraphUtils.FloatCurveToPoints(curveToEdit);
            UpdateCurve(out curve);
        }
Ejemplo n.º 7
0
 public UIColorModifierWindow(EffectColorModifier mod, bool show) : base((EffectModifier)mod, show)
 {
     colorMod       = mod;
     colorName      = colorMod.colorName;
     colorNames     = MaterialUtils.FindValidShaderProperties(colorMod.GetMaterial(), WaterfallMaterialPropertyType.Color).ToArray();
     colorIndex     = colorNames.ToList().FindIndex(x => x == colorMod.colorName);
     rCurveFunction = new CurveUpdateFunction(UpdateRedCurve);
     gCurveFunction = new CurveUpdateFunction(UpdateGreenCurve);
     bCurveFunction = new CurveUpdateFunction(UpdateBlueCurve);
     aCurveFunction = new CurveUpdateFunction(UpdateAlphaCurve);
     GenerateCurveThumbs(mod);
 }
Ejemplo n.º 8
0
 public UICurveEditWindow OpenCurveEditor(FloatCurve toEdit, CurveUpdateFunction curveFun)
 {
     if (curveEditWindow != null)
     {
         curveEditWindow.ChangeCurve(toEdit, curveFun);
     }
     else
     {
         curveEditWindow = new UICurveEditWindow(toEdit, curveFun, true);
     }
     return(curveEditWindow);
 }
 /// <summary>
 ///   Spawns the float editor panel to edit a float
 /// </summary>
 /// <param name="toEdit"></param>
 protected void EditCurve(FloatCurve toEdit, CurveUpdateFunction updateFunction)
 {
     Utils.Log($"Started editing curve {toEdit.Curve}", LogType.UI);
     curveEditor = WaterfallUI.Instance.OpenCurveEditor(toEdit, updateFunction);
 }
 public UIControllerPopupWindow(bool show) : base(show)
 {
     WindowPosition = new Rect(Screen.width / 2, Screen.height / 2f, 400, 400);
     eventFun       = new CurveUpdateFunction(UpdateEventCurve);
 }