예제 #1
0
        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);
        }
예제 #2
0
        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);
        }