public AssetImageSet OpenImageSet(string name, string idiom, string role, int width, int height) { AssetImageSet item = new AssetImageSet(base.m_Path, name, base.authorId); this.AddItem(item, idiom, role, width, height); return(item); }
public AssetImageSet OpenImageSet(string name, string idiom, string role, int width, int height) { AssetImageSet assetImageSet = new AssetImageSet(this.m_Path, name, this.authorId); this.AddItem((AssetCatalogItem)assetImageSet, idiom, role, width, height); return(assetImageSet); }
internal AssetImageStackLayer(string assetCatalogPath, string name, string authorId) : base(name, authorId) { this.m_Imageset = null; this.m_ReferencedName = null; base.m_Path = Path.Combine(assetCatalogPath, name + ".imagestacklayer"); this.m_Imageset = new AssetImageSet(base.m_Path, "Content", authorId); }
public AssetImageSet OpenImageSet(string name, string idiom, string role, int width, int height) { var newItem = new AssetImageSet(m_Path, name, authorId); AddItem(newItem, idiom, role, width, height); return(newItem); }
public AssetImageSet OpenImageSet(string name) { AssetImageSet existingItemWithType = this.GetExistingItemWithType <AssetImageSet>(name); if (existingItemWithType != null) { return(existingItemWithType); } AssetImageSet assetImageSet = new AssetImageSet(this.m_Path, name, this.authorId); this.m_Items.Add((AssetCatalogItem)assetImageSet); return(assetImageSet); }
public AssetImageSet OpenImageSet(string name) { AssetImageSet existingItemWithType = this.GetExistingItemWithType <AssetImageSet>(name); if (existingItemWithType != null) { return(existingItemWithType); } AssetImageSet item = new AssetImageSet(base.m_Path, name, base.authorId); this.m_Items.Add(item); return(item); }
// Checks if an imageset with given name exists and returns it if it does. // Otherwise, creates a new image set. public AssetImageSet OpenImageSet(string name) { var item = GetExistingItemWithType <AssetImageSet>(name); if (item != null) { return(item); } var imageset = new AssetImageSet(m_Path, name, authorId); m_Items.Add(imageset); return(imageset); }
private void WriteResizingToJson(JsonElementDict item, ImageResizing resizing) { JsonElementDict dict1 = item.CreateDict("resizing"); dict1.SetString("mode", AssetImageSet.GetSlicingMode(resizing.type)); JsonElementDict dict2 = dict1.CreateDict("center"); dict2.SetString("mode", AssetImageSet.GetCenterResizeMode(resizing.centerResizeMode)); dict2.SetInteger("width", resizing.centerWidth); dict2.SetInteger("height", resizing.centerHeight); JsonElementDict dict3 = dict1.CreateDict("cap-insets"); dict3.SetInteger("top", resizing.top); dict3.SetInteger("bottom", resizing.bottom); dict3.SetInteger("left", resizing.left); dict3.SetInteger("right", resizing.right); }
public void SetReference(string name) { this.m_Imageset = null; this.m_ReferencedName = name; }
public void SetReference(string name) { this.m_Imageset = (AssetImageSet)null; this.m_ReferencedName = name; }
public AssetImageSet OpenImageSet(string name, string idiom, string role, int width, int height) { AssetImageSet item = new AssetImageSet(base.m_Path, name, base.authorId); this.AddItem(item, idiom, role, width, height); return item; }
public void SetReference(string name) { m_Imageset = null; m_ReferencedName = name; }
internal AssetImageStackLayer(string assetCatalogPath, string name, string authorId) : base(name, authorId) { m_Path = Path.Combine(assetCatalogPath, name + ".imagestacklayer"); m_Imageset = new AssetImageSet(m_Path, "Content", authorId); }