add constness to UIButton

This commit is contained in:
andyque 2014-05-27 11:06:32 +08:00
parent 884d4c5d1f
commit f87e4243ee
2 changed files with 8 additions and 8 deletions

View File

@ -191,7 +191,7 @@ void Button::setScale9Enabled(bool able)
setBright(_bright);
}
bool Button::isScale9Enabled()
bool Button::isScale9Enabled()const
{
return _scale9Enabled;
}
@ -374,7 +374,7 @@ void Button::setCapInsetsNormalRenderer(const Rect &capInsets)
static_cast<extension::Scale9Sprite*>(_buttonNormalRenderer)->setCapInsets(capInsets);
}
const Rect& Button::getCapInsetsNormalRenderer()
const Rect& Button::getCapInsetsNormalRenderer()const
{
return _capInsetsNormal;
}
@ -389,7 +389,7 @@ void Button::setCapInsetsPressedRenderer(const Rect &capInsets)
static_cast<extension::Scale9Sprite*>(_buttonClickedRenderer)->setCapInsets(capInsets);
}
const Rect& Button::getCapInsetsPressedRenderer()
const Rect& Button::getCapInsetsPressedRenderer()const
{
return _capInsetsPressed;
}
@ -404,7 +404,7 @@ void Button::setCapInsetsDisabledRenderer(const Rect &capInsets)
static_cast<extension::Scale9Sprite*>(_buttonDisableRenderer)->setCapInsets(capInsets);
}
const Rect& Button::getCapInsetsDisabledRenderer()
const Rect& Button::getCapInsetsDisabledRenderer()const
{
return _capInsetsDisabled;
}

View File

@ -126,7 +126,7 @@ public:
*/
void setCapInsetsNormalRenderer(const Rect &capInsets);
const Rect& getCapInsetsNormalRenderer();
const Rect& getCapInsetsNormalRenderer()const;
/**
* Sets capinsets for button, if button is using scale9 renderer.
@ -135,7 +135,7 @@ public:
*/
void setCapInsetsPressedRenderer(const Rect &capInsets);
const Rect& getCapInsetsPressedRenderer();
const Rect& getCapInsetsPressedRenderer()const;
/**
* Sets capinsets for button, if button is using scale9 renderer.
@ -144,7 +144,7 @@ public:
*/
void setCapInsetsDisabledRenderer(const Rect &capInsets);
const Rect& getCapInsetsDisabledRenderer();
const Rect& getCapInsetsDisabledRenderer()const;
/**
* Sets if button is using scale9 renderer.
@ -153,7 +153,7 @@ public:
*/
virtual void setScale9Enabled(bool able);
bool isScale9Enabled();
bool isScale9Enabled()const;
/**
* Changes if button can be clicked zoom effect.