protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.Scale, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("CloudsEffect.ConfigDialog.ScaleLabel")); configUI.SetPropertyControlValue(PropertyNames.Power, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("CloudsEffect.ConfigDialog.RoughnessLabel")); configUI.SetPropertyControlValue(PropertyNames.Power, ControlInfoPropertyNames.SliderLargeChange, 0.25); configUI.SetPropertyControlValue(PropertyNames.Power, ControlInfoPropertyNames.SliderSmallChange, 0.05); configUI.SetPropertyControlValue(PropertyNames.Power, ControlInfoPropertyNames.UpDownIncrement, 0.01); PropertyControlInfo blendOpControl = configUI.FindControlForPropertyName(PropertyNames.BlendOp); blendOpControl.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = PdnResources.GetString("CloudsEffect.ConfigDialog.BlendModeHeader.Text"); Type[] blendOpTypes = UserBlendOps.GetBlendOps(); foreach (Type blendOpType in blendOpTypes) { string blendOpDisplayName = UserBlendOps.GetBlendOpFriendlyName(blendOpType); blendOpControl.SetValueDisplayName(blendOpType, blendOpDisplayName); } configUI.SetPropertyControlType(PropertyNames.Seed, PropertyControlType.IncrementButton); configUI.SetPropertyControlValue(PropertyNames.Seed, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("CloudsEffect.ConfigDialog.SeedHeader.Text")); configUI.SetPropertyControlValue(PropertyNames.Seed, ControlInfoPropertyNames.ButtonText, PdnResources.GetString("CloudsEffect.ConfigDialog.ReseedButton.Text")); configUI.SetPropertyControlValue(PropertyNames.Seed, ControlInfoPropertyNames.Description, PdnResources.GetString("CloudsEffect.ConfigDialog.UsageLabel")); return(configUI); }
static CloudsData () { Type[] blendOpTypes = UserBlendOps.GetBlendOps (); BlendOps = new Dictionary<string, object> (); foreach (Type myType in blendOpTypes) { string blendOpDisplayName = UserBlendOps.GetBlendOpFriendlyName (myType); BlendOps.Add (blendOpDisplayName, myType); } defaultBlendOp = UserBlendOps.GetBlendOpFriendlyName (UserBlendOps.GetDefaultBlendOp ()); }