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); }
EffectModifier CreateNewModifier() { if (modifierTypes[modifierFlag] == "Position") { EffectPositionModifier newMod = new EffectPositionModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else if (modifierTypes[modifierFlag] == "Rotation") { EffectRotationModifier newMod = new EffectRotationModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else if (modifierTypes[modifierFlag] == "Scale") { EffectScaleModifier newMod = new EffectScaleModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else if (modifierTypes[modifierFlag] == "UV Scroll") { EffectUVScrollModifier newMod = new EffectUVScrollModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else if (modifierTypes[modifierFlag] == "Material Color") { EffectColorModifier newMod = new EffectColorModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else if (modifierTypes[modifierFlag] == "Material Float") { EffectFloatModifier newMod = new EffectFloatModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else { return(null); } }
public UIRotationModifierWindow(EffectRotationModifier mod, bool show) : base((EffectModifier)mod, show) { rotMod = mod; GenerateCurveThumbs(mod); }
protected void GenerateCurveThumbs(EffectRotationModifier rotMod) { miniXCurve = GraphUtils.GenerateCurveTexture(texWidth, texHeight, rotMod.xCurve, Color.red); miniYCurve = GraphUtils.GenerateCurveTexture(texWidth, texHeight, rotMod.yCurve, Color.blue); miniZCurve = GraphUtils.GenerateCurveTexture(texWidth, texHeight, rotMod.zCurve, Color.green); }
public void OpenModifierEditWindow(EffectModifier fxMod) { foreach (UIModifierWindow editWin in editWindows.ToList()) { editWindows.Remove(editWin); } try { EffectColorModifier colMod = (EffectColorModifier)fxMod; if (colMod != null) { editWindows.Add(new UIColorModifierWindow(colMod, true)); } } catch (InvalidCastException e) { } try { EffectScaleModifier scaleMod = (EffectScaleModifier)fxMod; if (scaleMod != null) { editWindows.Add(new UIScaleModifierWindow(scaleMod, true)); } } catch (InvalidCastException e) { } try { EffectUVScrollModifier scrollMod = (EffectUVScrollModifier)fxMod; if (scrollMod != null) { editWindows.Add(new UIUVScrollModifierWindow(scrollMod, true)); } } catch (InvalidCastException e) { } try { EffectFloatModifier floatMod = (EffectFloatModifier)fxMod; if (floatMod != null) { editWindows.Add(new UIFloatModifierWindow(floatMod, true)); } } catch (InvalidCastException e) { } try { EffectPositionModifier posMod = (EffectPositionModifier)fxMod; if (posMod != null) { editWindows.Add(new UIPositionModifierWindow(posMod, true)); } } catch (InvalidCastException e) { } try { EffectRotationModifier rotMod = (EffectRotationModifier)fxMod; if (rotMod != null) { editWindows.Add(new UIRotationModifierWindow(rotMod, true)); } } catch (InvalidCastException e) { } }