public static Image Add(Image.Name ImageName, Texture.Name TextureName, float x, float y, float width, float height) { ImageMan pMan = ImageMan.PrivGetInstance(); Debug.Assert(pMan != null); Image pNode = (Image)pMan.BaseAdd(); Debug.Assert(pNode != null); // Initialize the data Texture pTexture = TextureMan.Find(TextureName); //Debug.Assert(pTexture != null); if (pTexture == null) { pTexture = TextureMan.Find(Texture.Name.Default); Debug.Assert(pTexture != null); x = 0; y = 0; width = 128; height = 128; } pNode.Set(ImageName, pTexture, x, y, width, height); return(pNode); }
//---------------------------------------------------------------------------------- // Methods //---------------------------------------------------------------------------------- public void set(Glyph.Name name, int key, Texture.Name textName, float x, float y, float width, float height) { Debug.Assert(this.pSubRect != null); this.name = name; this.pTexture = TextureMan.Find(textName); Debug.Assert(this.pTexture != null); this.pSubRect.Set(x, y, width, height); this.key = key; }
public static Image Add(Image.Name name, Texture.Name pTexName, int x, int y, int w, int h) { Debug.Assert(pMan != null); Image pImage = (Image)pMan.baseAdd(); Debug.Assert(pImage != null); Texture pTex = TextureMan.Find(pTexName); Debug.Assert(pTex != null); pImage.SetImage(name, pTex, x, y, w, h); return(pImage); }
public static Image Add(Image.Name ImageName, Texture.Name TextureName, float x, float y, float width, float height) { ImageMan pMan = ImageMan.privGetInstance(); Debug.Assert(pMan != null); Image pNode = (Image)pMan.baseAdd(); Debug.Assert(pNode != null); // Initialize the data Texture pTexture = TextureMan.Find(TextureName); Debug.Assert(pTexture != null); pNode.Set(ImageName, pTexture, x, y, width, height); return(pNode); }
public static Image Add(Image.Name imageName, Texture.Name textureName, float x, float y, float width, float height) { // ensure call Create() first ImageMan pMan = ImageMan.GetInstance(); Debug.Assert(pMan != null); // add Image to active list Image pImage = (Image)pMan.baseAdd(); Debug.Assert(pImage != null); // find the texture by texture name Texture pTexture = TextureMan.Find(textureName); Debug.Assert(pTexture != null); // set new Image pImage.set(imageName, pTexture, x, y, width, height); return(pImage); }
public static Image Add(Image.Name ImageName, Texture.Name TextureName, float x, float y, float width, float height) { ImageMan pIMan = ImageMan.PrivGetInstance(); Debug.Assert(pIMan != null); Image pINode = (Image)pIMan.BaseAdd(); Debug.Assert(pINode != null); // I really liked the default image and texture use Texture pTexture = TextureMan.Find(TextureName); if (pTexture == null) { pTexture = TextureMan.Find(Texture.Name.Default); Debug.Assert(pTexture != null); x = 0; y = 0; width = 128; height = 128; } pINode.Set(ImageName, pTexture, x, y, width, height); return(pINode); }
public void SwapTexture(Texture.Name textureName) { Texture pTexture = TextureMan.Find(textureName); this.poAzulSprite.SwapTexture(pTexture.GetAzulTexture()); }