using System; using Gwen.Control; namespace Gwen.ControlInternal { /// /// Modal control for windows. /// public class Modal : Base { /// /// Initializes a new instance of the class. /// /// Parent control. public Modal(Base parent) : base(parent) { KeyboardInputEnabled = true; MouseInputEnabled = true; ShouldDrawBackground = true; SetBounds(0, 0, GetCanvas().Width, GetCanvas().Height); } /// /// Lays out the control's interior according to alignment, padding, dock etc. /// /// Skin to use. protected override void Layout(Skin.Base skin) { SetBounds(0, 0, GetCanvas().Width, GetCanvas().Height); } /// /// Renders the control using specified skin. /// /// Skin to use. protected override void Render(Skin.Base skin) { skin.DrawModalControl(this); } } }