|
|
@ -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());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|