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 else
{ {
_buttonNormalRenderer->stopAllActions();
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
if (_scale9Enabled) if (_scale9Enabled)
{ {
updateFlippedX(); updateTextureRGBA();
updateFlippedY(); }
else
{
_buttonNormalRenderer->stopAllActions();
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
} }
} }
} }
@ -423,10 +425,17 @@ void Button::onPressStateChangedToPressed()
_buttonNormalRenderer->setVisible(true); _buttonNormalRenderer->setVisible(true);
_buttonClickedRenderer->setVisible(true); _buttonClickedRenderer->setVisible(true);
_buttonDisableRenderer->setVisible(false); _buttonDisableRenderer->setVisible(false);
if (_scale9Enabled)
{
_buttonNormalRenderer->setColor(Color3B::GRAY);
}
else
{
_buttonNormalRenderer->stopAllActions(); _buttonNormalRenderer->stopAllActions();
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize + 0.1f, _normalTextureScaleYInSize + 0.1f); _buttonNormalRenderer->setScale(_normalTextureScaleXInSize + 0.1f, _normalTextureScaleYInSize + 0.1f);
} }
} }
}
void Button::onPressStateChangedToDisabled() void Button::onPressStateChangedToDisabled()
{ {

View File

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