/// <summary> /// Initializes a new instance of the <see cref="ModulesHeader"/> class. /// </summary> /// <param name="parent">The parent emitter node.</param> /// <param name="type">The module type.</param> public ModulesHeader(ParticleEmitterNode parent, ParticleModules.ModuleType type) { ModuleType = type; Parent = parent; AutoFocus = false; float addButtonWidth = 80.0f; float addButtonHeight = 16.0f; AddModuleButton = new Button(Width * 0.5f, Height - addButtonHeight - 2.0f, addButtonWidth, addButtonHeight) { Text = "Add Module", TooltipText = "Add new particle modules to the emitter", AnchorStyle = AnchorStyle.BottomCenter, Parent = this }; AddModuleButton.ButtonClicked += OnAddModuleButtonClicked; }
/// <summary> /// Initializes a new instance of the <see cref="ModulesHeader"/> class. /// </summary> /// <param name="parent">The parent emitter node.</param> /// <param name="type">The module type.</param> public ModulesHeader(ParticleEmitterNode parent, ParticleModules.ModuleType type) { ModuleType = type; Parent = parent; AutoFocus = false; float addButtonWidth = 80.0f; float addButtonHeight = 16.0f; AddModuleButton = new Button { Text = "Add Module", TooltipText = "Add new particle modules to the emitter", AnchorPreset = AnchorPresets.BottomCenter, Parent = this, Bounds = new Rectangle((Width - addButtonWidth) * 0.5f, Height - addButtonHeight - 2, addButtonWidth, addButtonHeight), }; AddModuleButton.ButtonClicked += OnAddModuleButtonClicked; }