fixed bugs

This commit is contained in:
pipu 2014-03-31 11:34:26 +08:00
parent 733b364b51
commit 4c1cbabb5e
2 changed files with 16 additions and 6 deletions

View File

@ -392,12 +392,14 @@ void Button::onPressStateChangedToNormal()
}
else
{
_buttonNormalRenderer->stopAllActions();
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
if (_scale9Enabled)
{
updateFlippedX();
updateFlippedY();
updateTextureRGBA();
}
else
{
_buttonNormalRenderer->stopAllActions();
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
}
}
}
@ -423,8 +425,15 @@ void Button::onPressStateChangedToPressed()
_buttonNormalRenderer->setVisible(true);
_buttonClickedRenderer->setVisible(true);
_buttonDisableRenderer->setVisible(false);
_buttonNormalRenderer->stopAllActions();
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize + 0.1f, _normalTextureScaleYInSize + 0.1f);
if (_scale9Enabled)
{
_buttonNormalRenderer->setColor(Color3B::GRAY);
}
else
{
_buttonNormalRenderer->stopAllActions();
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize + 0.1f, _normalTextureScaleYInSize + 0.1f);
}
}
}

View File

@ -49,6 +49,7 @@ ListView::~ListView()
_listViewEventListener = nullptr;
_listViewEventSelector = nullptr;
_items.clear();
CC_SAFE_RELEASE(_model);
}
ListView* ListView::create()