Exemple #1
0
        } // SkinText

        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;
            }
        } // SkinText
Exemple #2
0
        } // LoadLayer

        #region Load Colors

        private static void LoadColors(bool inherited, XElement e, ref SkinStates <Color> colors)
        {
            if (e != null)
            {
                ReadAttribute(ref colors.Enabled, inherited, e.Element("Colors").Element("Enabled"), "Color", Color.White, false);
                ReadAttribute(ref colors.Hovered, inherited, e.Element("Colors").Element("Hovered"), "Color", colors.Enabled, false);
                ReadAttribute(ref colors.Pressed, inherited, e.Element("Colors").Element("Pressed"), "Color", colors.Enabled, false);
                ReadAttribute(ref colors.Focused, inherited, e.Element("Colors").Element("Focused"), "Color", colors.Enabled, false);
                ReadAttribute(ref colors.Disabled, inherited, e.Element("Colors").Element("Disabled"), "Color", colors.Enabled, false);
            }
        } // LoadColors
Exemple #3
0
        } // SkinLayer

        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.");
            }
        } // SkinLayer