bool VCursorProperties_t::Parse(VGUIManager *pManager, TiXmlElement *pNode, const char *szPath) { const bool bWrite = false; const char *szFilename = XMLHelper::Exchange_String(pNode,"texture",NULL,bWrite); if (szFilename) SetTexture(pManager->LoadTexture(szFilename,szPath)); else SetTexture(Vision::TextureManager.Load2DTexture("plainwhite.dds")); // hotspot XMLHelper::Exchange_Floats(pNode,"hotspot",m_vHotSpot.data,2,bWrite); // size XMLHelper::Exchange_Floats(pNode,"size",m_vSize.data,2,bWrite); // texture coordinates float *texCoordData = (float*)(&texCoord.m_vMin); XMLHelper::Exchange_Floats(pNode,"texcoords",texCoordData,4,bWrite); // color XMLHelper::Exchange_Color(pNode,"color",iColor,bWrite); // transparency XMLHelper::Exchange_Transparency(pNode,"transparency",m_eTransp,bWrite); if (m_vSize.x<0.f) SetSizeFromTexture(); return true; }
void Texture_Text::Init( TTF_Font *font, const SDL_Color &bgColor, const SDL_Color &fgColor ) { textFont = font; textColor = bgColor; backgroundColor = fgColor; SetSizeFromTexture(); }