Fixed: Don't compress textures in DXTC when used as buttons

This commit is contained in:
kervala 2012-09-25 21:21:58 +02:00
parent e7d490d9a8
commit edee553e1b
2 changed files with 6 additions and 18 deletions

View file

@ -50,24 +50,21 @@ bool CCtrlButton::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
if (prop) if (prop)
{ {
string TxName = (const char *) prop; string TxName = (const char *) prop;
TxName = strlwr(TxName); setTexture(toLower(TxName));
_TextureIdNormal.setTexture(TxName.c_str());
} }
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_pushed" ); prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_pushed" );
if (prop) if (prop)
{ {
string TxName = (const char *) prop; string TxName = (const char *) prop;
TxName = strlwr(TxName); setTexturePushed(toLower(TxName));
_TextureIdPushed.setTexture(TxName.c_str());
} }
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_over" ); prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_over" );
if (prop) if (prop)
{ {
string TxName = (const char *) prop; string TxName = (const char *) prop;
TxName = strlwr(TxName); setTextureOver(toLower(TxName));
_TextureIdOver.setTexture(TxName.c_str());
} }
// *** Misc. // *** Misc.
@ -261,25 +258,19 @@ void CCtrlButton::updateCoords()
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void CCtrlButton::setTexture(const std::string&name) void CCtrlButton::setTexture(const std::string&name)
{ {
// CInterfaceManager *pIM = CInterfaceManager::getInstance(); _TextureIdNormal.setTexture(name.c_str (), 0, 0, 0, 0, false);
// CViewRenderer &rVR = pIM->getViewRenderer();
_TextureIdNormal.setTexture(name.c_str());
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void CCtrlButton::setTexturePushed(const std::string&name) void CCtrlButton::setTexturePushed(const std::string&name)
{ {
// CInterfaceManager *pIM = CInterfaceManager::getInstance(); _TextureIdPushed.setTexture(name.c_str (), 0, 0, 0, 0, false);
// CViewRenderer &rVR = pIM->getViewRenderer();
_TextureIdPushed.setTexture(name.c_str());
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void CCtrlButton::setTextureOver(const std::string&name) void CCtrlButton::setTextureOver(const std::string&name)
{ {
// CInterfaceManager *pIM = CInterfaceManager::getInstance(); _TextureIdOver.setTexture(name.c_str (), 0, 0, 0, 0, false);
// CViewRenderer &rVR = pIM->getViewRenderer();
_TextureIdOver.setTexture(name.c_str());
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View file

@ -221,9 +221,6 @@ void CViewBitmap::updateCoords()
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void CViewBitmap::setTexture(const std::string & TxName) void CViewBitmap::setTexture(const std::string & TxName)
{ {
// CInterfaceManager *pIM = CInterfaceManager::getInstance();
// CViewRenderer &rVR = pIM->getViewRenderer();
_TextureId.setTexture (TxName.c_str (), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false); _TextureId.setTexture (TxName.c_str (), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false);
} }