public SkinText(SkinText source) : base(source) { if (source != null) { Font = new SkinFont(source.Font); OffsetX = source.OffsetX; OffsetY = source.OffsetY; Alignment = source.Alignment; Colors = source.Colors; } }
/// <param name="colors"></param> /// <param name="e"></param> /// <param name="inherited"></param> /// </summary> /// </summary> 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 SkinLayer(SkinLayer source) : base(source) { if (source != null) { Image = new SkinImage(source.Image); Width = source.Width; Height = source.Height; OffsetX = source.OffsetX; OffsetY = source.OffsetY; Alignment = source.Alignment; SizingMargins = source.SizingMargins; ContentMargins = source.ContentMargins; States = source.States; Overlays = source.Overlays; Text = new SkinText(source.Text); Attributes = new SkinList <SkinAttribute>(source.Attributes); } else { throw new Exception("Parameter for SkinLayer copy constructor cannot be null."); } }