void brusheffect_Toggled(object o, EventArgs e) { IBrushEffect targeteffect = brusheffects[o as RadioButton]; Console.WriteLine("selected effect " + targeteffect); CurrentEditBrush.GetInstance().BrushEffect = targeteffect; ClearVBox(custombrusheffectlabels); ClearVBox(custombrusheffectwidgets); targeteffect.ShowControlBox(custombrusheffectlabels, custombrusheffectwidgets); }
public void Register(IBrushEffect brusheffect) { Console.WriteLine(this.GetType() + " registering " + brusheffect); this.brusheffects.Add(brusheffect.GetType(), brusheffect); if (CurrentEditBrush.GetInstance().BrushEffect == null) { CurrentEditBrush.GetInstance().BrushEffect = brusheffect; } MainTerrainWindow.GetInstance().AddBrushEffect(brusheffect.Name, brusheffect.Description, brusheffect); }
public void Register( IBrushEffect brusheffect ) { Console.WriteLine(this.GetType() + " registering " + brusheffect ); this.brusheffects.Add( brusheffect.GetType(), brusheffect ); if (CurrentEditBrush.GetInstance().BrushEffect == null) { CurrentEditBrush.GetInstance().BrushEffect = brusheffect; } MainUI.GetInstance().uiwindow.AddBrushEffect( brusheffect.Name, brusheffect.Description, brusheffect ); }
public void AddBrushEffect(string name, string description, IBrushEffect brusheffect) { RadioButton radiobutton = null; if (brusheffectgroup != null) { radiobutton = new RadioButton(brusheffectgroup, name); brusheffectvbox.PackEnd(radiobutton); brusheffectvbox.ShowAll(); } else { radiobutton = new RadioButton(name); brusheffectvbox.PackEnd(radiobutton); brusheffectvbox.ShowAll(); //radiobutton.Activate(); brusheffectgroup = radiobutton; brusheffect.ShowControlBox(custombrusheffectlabels, custombrusheffectwidgets); } brusheffects.Add(radiobutton, brusheffect); radiobutton.Toggled += new EventHandler(brusheffect_Toggled); }
public void AddBrushEffect( string name, string description, IBrushEffect brusheffect ) { RadioButton radiobutton = null; if (brusheffectgroup != null) { radiobutton = new RadioButton( brusheffectgroup, name ); brusheffectvbox.PackEnd( radiobutton ); brusheffectvbox.ShowAll(); } else { radiobutton = new RadioButton( name ); brusheffectvbox.PackEnd( radiobutton ); brusheffectvbox.ShowAll(); //radiobutton.Activate(); brusheffectgroup = radiobutton; brusheffect.ShowControlBox( custombrusheffectlabels, custombrusheffectwidgets ); } brusheffects.Add( radiobutton, brusheffect ); radiobutton.Toggled += new EventHandler(brusheffect_Toggled); }