Ejemplo n.º 1
0
        public LoadedTexture(Texture pmTexture)
        {
            texture=	pmTexture;
            name=	pmTexture.name;

            name=	name.Substring(0, name.LastIndexOf('.'));
        }
Ejemplo n.º 2
0
 internal QMesh(Point3f[] v, TexCoord[] t, Color[] c, ushort[] f, Matrix m, Texture tx, string n, Bone[] pmBones, bool outline)
     : base(Matrix.IDENTITY, pmBones)
 {
     vertices=	v;
     texcoords=	t;
     colors=	c;
     faces=	f;
     pMatrix=	m;
     pTexture=	tx;
     name=	n;
     bRenderOutline=	outline;
 }
Ejemplo n.º 3
0
        public TexCoord(float pmU, float pmV, Texture texture)
        {
            if(texture.WIDTH!= 0 && texture.HEIGHT!= 0)
            {
                if(pmU> 1f)
                    pmU/=	(float)texture.WIDTH;
                if(pmV> 1f)
                    pmV/=	(float)texture.HEIGHT;
            }

            u=	pmU;
            v=	1f-pmV;
        }
Ejemplo n.º 4
0
        public GUIButton(GUISprite sprite)
            : base(sprite)
        {
            pText=	"BUTTON";
            pHoverTexture=	pTexture;
            pPressedTexture=	pTexture;
            pDisabledTexture=	pTexture;
            pHoverColor=	new Color(255, 128, 0);
            pPressedColor=	new Color(0, 128, 255);
            if(pSprite!= null)
            {
                pTexBounds=	pSprite.textureBounds;
                pHoverTexBounds=	pSprite.textureBounds;
                pPressedTexBounds=	pSprite.textureBounds;
                pDisabledTexBounds=	pSprite.textureBounds;
            }
            else
            {
                pTexBounds=	new Rectangle(0f, 0f, 1f, 1f);
                pHoverTexBounds=	new Rectangle(0f, 0f, 1f, 1f);
                pPressedTexBounds=	new Rectangle(0f, 0f, 1f, 1f);
                pDisabledTexBounds=	new Rectangle(0f, 0f, 1f, 1f);
            }

            bEText=	false;
            bETexHover=	false;
            bETexPressed=	false;
            bETexDisabled=	false;
            bEFgColor=	false;
            bEHoverColor=	false;
            bEPressedColor=	false;
            bEHoverTexBounds=	false;
            bEPressedTexBounds=	false;
            bEDisabledTexBounds=	false;

            e_text=	null;
            e_texHover=	null;
            e_texPressed=	null;
            e_texDisabled=	null;
            e_fgColor=	null;
            e_hoverColor=	null;
            e_pressedColor=	null;
            e_hoverTexBounds=	null;
            e_pressedTexBounds=	null;
            e_disabledTexBounds=	null;
        }
Ejemplo n.º 5
0
 // Sets the texture bounds of the sprite
 internal void setTexture(Texture pmTexture)
 {
     pTexture=	pmTexture;
     setTextureBounds(tb);
 }
Ejemplo n.º 6
0
 // Sets all the textures to the given texture
 public void setAllTextures(Texture pmTexture)
 {
     texture=	pmTexture;
     hoverTexture=	pmTexture;
     pressedTexture=	pmTexture;
     disabledTexture=	pmTexture;
 }
Ejemplo n.º 7
0
 // Finds if the given texture is equal to this texture
 public bool equals(Texture texture)
 {
     return (ID== texture.ID);
 }
Ejemplo n.º 8
0
 public Font()
 {
     dictionary=	new FDictionary<char, Glyph>();
     ovaTexture=	Texture.NULL;
 }