private void LoadColors(bool inherited, XmlElement e, ref SkinStates <Color> colors) { if (e != null) { ReadAttributeColor(ref colors.Enabled, inherited, e["Colors"]["Enabled"], "Color", Color.White, false); ReadAttributeColor(ref colors.Hovered, inherited, e["Colors"]["Hovered"], "Color", colors.Enabled, false); ReadAttributeColor(ref colors.Pressed, inherited, e["Colors"]["Pressed"], "Color", colors.Enabled, false); ReadAttributeColor(ref colors.Focused, inherited, e["Colors"]["Focused"], "Color", colors.Enabled, false); ReadAttributeColor(ref colors.Disabled, inherited, e["Colors"]["Disabled"], "Color", colors.Enabled, false); } }
public SkinText(SkinText source) : base(source) { if (source != null) { this.Font = new SkinFont(source.Font); this.OffsetX = source.OffsetX; this.OffsetY = source.OffsetY; this.Alignment = source.Alignment; this.Colors = source.Colors; } }
public SkinLayer(SkinLayer source) : base(source) { if (source != null) { this.Image = new SkinImage(source.Image); this.Width = source.Width; this.Height = source.Height; this.OffsetX = source.OffsetX; this.OffsetY = source.OffsetY; this.Alignment = source.Alignment; this.SizingMargins = source.SizingMargins; this.ContentMargins = source.ContentMargins; this.States = source.States; this.Overlays = source.Overlays; this.Text = new SkinText(source.Text); this.Attributes = new SkinList <SkinAttribute>(source.Attributes); } else { throw new Exception("Parameter for SkinLayer copy constructor cannot be null."); } }