public LoadedTexture(Texture pmTexture) { texture= pmTexture; name= pmTexture.name; name= name.Substring(0, name.LastIndexOf('.')); }
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; }
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; }
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; }
// Sets the texture bounds of the sprite internal void setTexture(Texture pmTexture) { pTexture= pmTexture; setTextureBounds(tb); }
// Sets all the textures to the given texture public void setAllTextures(Texture pmTexture) { texture= pmTexture; hoverTexture= pmTexture; pressedTexture= pmTexture; disabledTexture= pmTexture; }
// Finds if the given texture is equal to this texture public bool equals(Texture texture) { return (ID== texture.ID); }
public Font() { dictionary= new FDictionary<char, Glyph>(); ovaTexture= Texture.NULL; }