Fixed: Don't compress textures in DXTC when used as buttons
This commit is contained in:
parent
25bfadcff8
commit
6fa100fef8
2 changed files with 6 additions and 18 deletions
|
@ -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());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue