AddPalette() public method

public AddPalette ( MegaMan.Common.PaletteInfo palette ) : void
palette MegaMan.Common.PaletteInfo
return void
Ejemplo n.º 1
0
        public void Load(Project project, XElement xmlNode)
        {
            foreach (var node in xmlNode.Elements("Palette"))
            {
                var palette = PaletteFromXml(node, project.BaseDir);

                project.AddPalette(palette);
            }
        }
Ejemplo n.º 2
0
        public void Load(Project project, XElement node)
        {
            var palette = new PaletteInfo();

            var imagePathRelative = node.RequireAttribute("image").Value;
            palette.ImagePath = FilePath.FromRelative(imagePathRelative, project.BaseDir);
            palette.Name = node.RequireAttribute("name").Value;

            project.AddPalette(palette);
        }
        public IIncludedObject Load(Project project, XElement xmlNode)
        {
            var group = new IncludedObjectGroup();
            foreach (var node in xmlNode.Elements("Palette"))
            {
                var palette = PaletteFromXml(node, project.BaseDir);
                group.Add(palette);
                project.AddPalette(palette);
            }

            return group;
        }